...
Annotation | Description |
---|---|
Marker annotation for type conversions at Type level. | |
For Collection and Map types: Create the types within the Collection or Map, if null. | |
For Generic types: Specify the element type for Collection types and Map values. | |
For Generic types: Specify the key type for Map keys. | |
For Generic types: Specify the key property name value. | |
Used for class and application wide conversion rules. |
...
This is an example for the apt ant target:
Code Block | ||||
---|---|---|---|---|
| ||||
<target name="apt">
<mkdir dir="${build}/generated"/>
<path id="classpath">
<pathelement path="${basedir}/build/java"/>
<pathelement path="${basedir}/build/test"/>
<!-- xwork.jar and xwork-tiger.jar must be in one of the following lib dirs -->
<fileset dir="${basedir}/lib/build" includes="*.jar"/>
<fileset dir="${basedir}/lib/default" includes="*.jar"/>
<fileset dir="${basedir}/lib/spring" includes="*.jar"/>
</path>
<property name="pclasspath" refid="classpath"/>
<!-- Change the includes attribute value to match your annotated java files -->
<fileset id="sources" dir="." includes="src/test/**/*.java" />
<pathconvert pathsep=" " property="sourcefiles" refid="sources"/>
<echo>
CLASSPATH ${pclasspath}
SOURCES: ${sourcefiles}
</echo>
<exec executable="apt" >
<arg value="-s"/>
<arg value="${build}/generated"/>
<arg value="-classpath"/>
<arg pathref="classpath"/>
<arg value="-nocompile"/>
<arg value="-factory"/>
<arg value="com.opensymphony.xwork.apt.XWorkProcessorFactory"/>
<arg line="${sourcefiles}"/>
</exec>
</target>
|