How to Change JAXB attributes in Child java class



I have a class(lets say Foo) of which an attribute is annotated as @xmlElement(required=true). I have another class Bar which extends Foo. In Bar, I want the so called attributed to be not mandatory. How can I achieve this behavior?( I have used @XmlAccessorType to FIELD, so I have annotated the attribute. It wont be an issue if I have to annotate the getter method of that attribute)..


Thanks,


No comments:

Post a Comment