[stringtemplate-interest] Applying a property to a list

Michael micha-1 at fantasymail.de
Mon Jun 15 04:49:48 PDT 2009


Am Monday 15 June 2009 13:36:36 schrieb Damien Cassou:
> Hi,
>
> I would like StringTemplate to print the property of each element of a
> list. Something along:
>
> $struct.fields.name$
>
> where:
>
> - a struct has a getFields() method which returns a list of fields
> - a field as a getName() method

then this should work:

$struct.fields: { $it.name$ }$

cheers
 Michael



More information about the stringtemplate-interest mailing list