@Xml... annotation telling schemagen to ignore a method completely
Hi all,
I write Java Beans and annotate them by @Xml... annotations in the source code. I am able to generate a proper schema from the classes and to marschal a class into a XML document, etc.. I am missing one thing: I would like the marshalable classes to have some methods which would be totally ignored during generating the schema, marshalling and unmarshalling and which could use any classes not described and not included in the schema. Actually, I am wrinting a persistent representation of classes which I cannot change as they are a part of a JAR distribution - I would like the Java Bean classes to have methods for a creation of the non-persistent classes which the persistent classes represent.
I am missing a @Xml... annotation that would tell the schemagen, Marshaller and Unmarshaller to ignore these methods (no matter what types of classes they return, use as parameters). The @XmlTransient seemed to be the closest one, but it is not applicable to methods. Does there exist an annotation for or just a way of having such methods in a marshallable class that would be completelly ignored by JAXB 2.0? (I assume that e.g. during unmarshalling is taken the appropriate class and the properties are initialized in accordance to the content of the XML document and methods are not affeted anyhow.)
Thanks,
Bebe