tags:

views:

76

answers:

0

I have a class with a complex method which returns boolean (no property field or setter for this field provided). I need to bind this class with JiBX so result of the method would be marshalled to XML element/attribute and would be omitted when unmarshalling. So I want to get something like this:

<mapping name="freak" class="com.test.Freak">
    <namespace uri="http://www.test.com/schemas/test" default="elements" />
    <value name="id" field="id" style="attribute"/>
    <value name="real-freak" get-method="isRealFreak" style="attribute" usage="optional" />        
</mapping>

P.S. I can't fix this class to add stub setter, need to use it as is.