users@jaxb.java.net

Re: XJC: get the Annotation-Information of a field

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Fri, 27 Nov 2009 10:20:46 +0100

Hi,

> Dear XJC-Users,
> how I can find out, how an field is annotated?
>
> Suppose I have a class with two fields:
> SupposedClass {
> @XmlElement(name = "AnElement")
> protected AnElement anElement;
> @XmlAttribute(name = "attribute")
> protected AnAttribute attribute;
> }
>
> How can I find out, if an field is an XmlElement or an XmlAttribute and which name it uses?

https://jaxb2-reflection.dev.java.net/users-guide.html

Bye.
/lexi