I have a question about the JAXB-generated javadoc code.
So within the schema of interest, there are two "container" elements. One element represents "the report" and it has a couple attributes (timestamp, if it's production data or not). The other element represents one row of data and it has an id attribute. All the other elements represent the columns of data, and for the most part are simple types.
Here is an edited version (took out most columns and anonymized) of the schema:
My problem is with the generated Javadoc comments. Here is the top part of the javadoc for the complex type 'ReportRecord':
So on line 14 it correctly identifies the class name, and at line 19 the schema snippet has a name attribute.
But a similar example from the CompanyBillingReport class:
So, at lines 3 and 8, the information is missing. It's like JAXB didn't know what it was (a CompanyBillingReport class), when it was generating the javadoc. All it says is "anonymous class", and there's no name attribute on the schema snippet.
to be precisely JAXB doesn't say "anonymous class" but "anonymous complex type"
The difference between "ReportRecord" and "CompanyBillingReport" is that CompanyBillingReport is directly defined as a <element> with an anonymous complex type inside it. Therefore the embedded complex type is anonymous and JAXB transforms it in a different way by default. See the difference?
I'm not sure why JAXB creates this third factory method for your modified schema. Unfortunately it's some time ago when i used JAXB the last time
Basically the "normal" classes wrapped in a JAXBElement just contain additional XML specific information (have a look at the API). But you can use the other classes without this and simply construct your object hierarchies just like with any other POJOs. I just used this JAXBElement wrapper for the root element of an XML document, i.e. I wrapped the root element with a JAXBElement before giving it to the Marshaller and it's a JAXBElement you get from the Unmarshaller when parsing a XML document. Then you have to call jaxbElement.getValue() to get the "real" root object of a tree hierarchy.
Perphaps someone other knows more exactly what this is good for...
subject: Problems with JAXB-generated javadoc code