className | The class name of the conversion. |
methodName | The name of the method that provides the conversion if the conversion
is not an org.oddjob.arooa.convert.ConversionProvider . |
Example 1 | Creating Gremlins |
Configured By | ATTRIBUTE |
Access | READ_WRITE |
Required | yes. |
The class name of the conversion. If a method is provided then
this is the name of the class that has that method and the conversion will be from
objects of that class to the return type of the method. If method is provided then
this class name must refer to an org.oddjob.arooa.convert.ConversionProvider
.
Configured By | ATTRIBUTE |
Access | READ_WRITE |
Required | No. |
The name of the method that provides the conversion if the conversion
is not an org.oddjob.arooa.convert.ConversionProvider
. The conversion will be provided via reflection
at runtime using this method. The return type of this method is used to register the
conversion 'to' class.
Creating Gremlins
<oddjob id="oddjob"> <job> <oddjob file="${oddjob.dir}/ReflectionConversionExample.xml" id="example"> <descriptorFactory> <arooa:descriptor xmlns:arooa="http://rgordon.co.uk/oddjob/arooa"> <conversions> <arooa:conversion className="org.oddjob.arooa.convert.gremlin.GremlinSupplier" methodName="get"/> </conversions> </arooa:descriptor> </descriptorFactory> </oddjob> </job> </oddjob>
<oddjob> <job> <sequential> <jobs> <variables id="vars"> <gremlin> <bean class="org.oddjob.arooa.convert.gremlin.GremlinSupplier" name="Gizmo"/> </gremlin> </variables> <bean class="org.oddjob.arooa.convert.gremlin.ThingWithGremlin" id="thing"> <myGremlin> <value value="${vars.gremlin}"/> </myGremlin> </bean> </jobs> </sequential> </job> </oddjob>