[Index]
convert
Convert a value to the given Java Class.
Property Summary
is |
The result of the conversion. |
to |
The name of the java class to convert to. |
value |
The value to convert. |
Example Summary
Example 1 |
Convert a delimited list to an array of Strings. |
Property Detail
is
Access | READ_ONLY |
Required | Read Only. |
The result of the conversion.
to
Configured By | ELEMENT |
Access | READ_WRITE |
Required | Yes. |
The name of the java class to convert to.
value
Configured By | ELEMENT |
Access | READ_WRITE |
Required | No. If missing the result of the conversion will be
null. |
The value to convert.
Examples
Example 1
Convert a delimited list to an array of Strings.
<oddjob id="this">
<job>
<foreach>
<values>
<convert>
<to>
<class name="[Ljava.lang.String;"/>
</to>
<value>
<value value=""grapes, red", "grapes, white", gratefruit"/>
</value>
</convert>
</values>
<configuration>
<xml>
<foreach id="loop">
<job>
<echo>${loop.current}</echo>
</job>
</foreach>
</xml>
</configuration>
</foreach>
</job>
</oddjob>
(c) Rob Gordon 2005 - 2013