If you have some Java class:
@XmlType(namespace="")
@XmlRootElement(name="", namespace="")
public class Car
{
// This is some comment
@XmlElement()
private long id;
...
And you want to create schema like this (with comment inside schema):
<xs:complexType name="Car ">
<xs:sequence>
<xs:documentation> This is some comment</xs:documentation>
<xs:element name="id" type="xs:long"/>
</xs:sequence>
</xs:complexType>
Is there way how to configure JAXB? I have think, is there way how to create "new annotation", so my Java class would look like:
@XmlType(namespace="")
@XmlRootElement(name="", namespace="")
public class Car
{
@XmlDoc("This is some comment")
@XmlElement()
private long id;
...
In other words: can I tell jaxb, that new annotation is important to him and how it should be "parsed" in context.generateSchema (schemaOutputResolver)
(As example: @XmlDoc is new annotation and jaxb should take its value and put in xs: document element)