1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
<!-- Same as base version, except using a factory method for the List. Also try
using overloaded set methods for properties -->
<binding>
<mapping name="myelement" class="simple.MyClass2">
<value name="a" get-method="getA" set-method="setA" style="attribute"/>
<value name="b" get-method="getB" set-method="setB" style="attribute" usage="optional"/>
<value name="c" field="c" style="attribute" usage="optional"/>
<value name="d" field="d" style="attribute" usage="optional"/>
<value name="e" field="e" style="attribute" usage="optional" type="java.lang.Integer"/>
<value name="f" field="f" style="attribute" usage="optional"/>
<value name="g" get-method="getG" set-method="setG" type="java.lang.Integer"/>
<structure name="dimension" field="dimen" value-style="attribute"
usage="optional">
<value name="width" field="width"/>
<value name="height" field="height"/>
</structure>
<structure name="rectangle" field="rect" usage="optional">
<value name="width" field="width" style="attribute"/>
<value name="height" field="height" style="attribute"/>
<value name="x" field="x"/>
<value name="y" field="y"/>
</structure>
<collection name="ints" field="ints"
factory="simple.MyClass2.listFactory" usage="optional">
<value name="int" type="java.lang.Integer"/>
</collection>
</mapping>
</binding>
|