Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

JAXB Problem

  Asked By: John    Date: Jun 03    Category: Java    Views: 486
  

I write a plugin that add a new field to the class, now I want add code too my
plugin when adding this field ,also add their annotations , because if thier
annotation isnt added ,The marshalling process doesnt add this new field .
I,m successful about @XmlElementRefs but no about @XmlType.

I add this code to my plugin but it adds a new @XmlType ,
that I dont need new @XmlType , I need to add a new Item to
proporder of available @XmlType .

my code is here :

private void addPropOrder(CPropertyInfo p, ClassOutline classOutline, JFieldVar
$field) {
XmlTypeWriter xtw = classOutline.implClass.annotate2(XmlTypeWriter.class);
if (p instanceof CReferencePropertyInfo) {
xtw.propOrder($field.name());
}
}

and result of this code is :

@XmlType(name = "ProcessSpecificationType", propOrder = {
"documentation",
"attributeSubstitution",
"externalRoles",
"signal",
"variable",
"packageOrBusinessDocumentOrBusinessTransactionHead"
})
@XmlType(propOrder = {
"choiceOrGroupSemanticallyPreservedPackageOrBusinessDocumentOrBusinessTransactio\
nHead"
})

that I nedd this result :

@XmlType(name = "ProcessSpecificationType", propOrder = {
"documentation",
"attributeSubstitution",
"externalRoles",
"signal",
"variable",
"packageOrBusinessDocumentOrBusinessTransactionHead",
"choiceOrGroupSemanticallyPreservedPackageOrBusinessDocumentOrBusinessTransactio\
nHead"
})

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on JAXB Problem Or get search suggestion and latest updates.




Tagged: