I am using a string template group to create a java source file. Several of the classes extend another class and need to call a super method that can contain a mixture of types, normally int
, String
and Enum
.
super(list) ::= <<
super(<stringList(list)>);
>>
stringList(list) ::= <<
<list:{v | <s(v)>}; separator=", ">
>>
s(v) ::= <<
<if (v)><v; format="java-string"><else>null<endif>
>>
I have these templates to build a super
method that just contains Strings. How do I create a template that can handle a mixture of Strings
, ints
and Enums
?