There is no standard check that can be performed on JAXB annotations. In truth, for the most part, this is because the typed nature of the object model reduces the amount of invalid input that may appear (for example, if my client element has a child address element, then my Customer object has the Address property, t set that or, except for the Address object, to this property).
If you want the check to be related to restricting the collection to certain numerical elements (since you have maxOccurs = "10") or a string with a certain length (since you have a circuit facet). JAXB 2.X (JSR 222) does not by default generate them in your object model (although you can certainly add them yourself, as people do when using JPA), using JSR 303 and starting the validator.
Other questions related to your question:
If you are having problems with the XJC tool, please consider entering an error into it:
If annotations are missing, @XmlElement is used by default, so some of these annotations may be missing for this reason. Annotation is usually added only for a name or namespace.
With JAXB (like JPA) you can start with POJO. JAXB annotations can be added to customize the XML presentation.
source share