[stringtemplate-interest] StringTemplate type proxies

Sam Harwell sharwell at pixelminegames.com
Sun Dec 12 19:40:58 PST 2010


I recently started using StringTemplate for a significant code generation
project. I'm quite happy with the way things are progressing, but I'm
noticing there are several times where I have to add a new property to my
code objects just so StringTemplate can produce the desired output. In a
manner similar to attribute renderers, I believe the addition of type
proxies would be extremely beneficial. Suppose the user registers a type
proxy for type T. The type proxy exposes the following method:

 

object createProxy(object value);

 

Whenever an attribute resolves to a value of type T, the proxy's
createProxy() method is called. Attributes on the object are resolved
against the value returned by the proxy.

 

Any thoughts on this?

 

Thanks,

Sam

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20101212/d1142ab4/attachment.html 


More information about the stringtemplate-interest mailing list