[stringtemplate-interest] How can I test if an attribute exists?
Samuel Lee
sam.lee at meegenius.com
Mon Nov 16 10:12:55 PST 2009
This is what I want to do:
$if(it.foo)$
do something with $it.foo$
$endif$
Obviously, it throws an exception: java.lang.NoSuchFieldException.
I also tried:
$if(!it.foo)$
and
$if(!(it.foo))$
but I can't eliminate the exception.
Is it possible to conditionally do something if an object has specific
attribute?
Thanks
Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20091116/74f91b8a/attachment.html
More information about the stringtemplate-interest
mailing list