Using primitives instead of objects
XJConf is also able to create primitive types like int, float or boolean values. All you need to do is change the tag definition:
<tag name="int" type="int"/> <tag name="bool" type="boolean"/> <tag name="double" type="double"/>
Now you can use these tags as you would use tags that define objects.
Currently the following primitives can be used:
- short
- int
- float
- double
- boolean
Primitives can also be used in attribute values:
<defines>
<tag name="color" type="net.schst.XJConf.Examples.ColorPrimitives">
<attribute name="red" type="int"/>
<attribute name="green" type="int"/>
<attribute name="blue" type="int"/>
</tag>
</defines>
