The reason for XJC not generating a class if there is an enumeration value that starts with a digit is that it is illegal for a field to start with a digit in Java.
The above type generates the following class:
If you insert a digit first in any of the names AAA, BBB or CCC in the MyCode enumeration type, there will be a syntax error.
XJC will not generate illegal Java code and will thus not generate an enumeration if one of your allowed enumeration values will result in an illegal field name.
Joined: Nov 08, 2009
Thanks for the response
But what if I need to have numbers initially?
I tried creating a simple type: