[stringtemplate-interest] Renderers and model adapters for null

Terence Parr parrt at cs.usfca.edu
Sun Dec 4 15:49:52 PST 2011


hi Collin, does this provide more functionality than the "null" option on the expressions? I'm not sure, I'm just asking.
Ter
On Aug 22, 2011, at 6:14 AM, Collin Fagan wrote:

> Hi All,
> 
> I don't know if I've asked this before (I can't find it in my archive) but would it be possible to allow ST4 to register model adapters and renderers for null?
> 
> Null actually does have a class type in java. It's Void. 
> 
> group.registerModelAdaptor(Void.class,
>                 new NullAdapter());
> 
> I looked at the code adn it does not seem too complex to add this functionality. What do people think?
> 
> My first use case would be to add a method called "isNull" that always returns false. I can see other uses also.
> 
> 
> Collin  
> 
> 
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org/mailman/listinfo/stringtemplate-interest



More information about the stringtemplate-interest mailing list