@Documented @Retention(value=RUNTIME) @Target(value=METHOD) public @interface XmlIdentifier
This annotation is very much like the standard
JAXB annotation XmlID
except
that the uniqueness of this field need only be per xpath from
the root, and not over the entire tree. For example, consider
a Java Bean such as a PropertyBean that is used all over the tree
for those Beans that have a set of properties. The PropertyBean
might have identical keys in two different xpaths from the root, and
therefore could not use XmlID
,
since the XmlID
requires uniqueness
over the entire tree, and not over just one xpath
Furthermore, whereas XmlID
can be referred
to with XmlIDREF
there is no corresponding
automatic reference with this annotation. If both
XmlID
and this annotation are found
on different properties of this bean then this annotation will be used
in preference over XmlID
Copyright © 2009–2023 Oracle Corporation. All rights reserved.