Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: JiBX 1.2.3
-
Fix Version/s: None
-
Component/s: CodeGen
-
Labels:None
-
Number of attachments :
Description
When generating code from schema elements with a name that has only one character like
<xs:complexType name="fooBar"> <xs:sequence> <xs:element name="x" type="xs:double" minOccurs="0" > </xs:sequence> </xs:complexType>
the generated class member will be uppercased.
private Double X;
That causes trouble when extending the CodeGeneration because
public void valueAdded(String basename, boolean collect, String type, FieldDeclaration field, MethodDeclaration getmeth, MethodDeclaration setmeth, String descript, IClassHolder holder)
will get the original lowercase basename which will not be a valid member of the generated class.
additional description:
The valuedAdded method belongs to the org.jibx.schema.codegen.extend.ClassDecorator interface which has to be implemented by custom class decorators.