Affects Version/s: 2.2.4u1
Fix Version/s: None
When following customization is enabled:
XJC generates JDefinedClass for super interface java.lang.Cloneable. However by contract JDefinedClass objects should be created for generated classes.
Expected: java.lang.Cloneable should be a JClass created by JCodeModel.ref(Class) or JDirectClass created by JCodeModel.directClass(String).
The confusion is generally caused by the use of JDefinedClass.hide(). This effect and should be better implemented by making a common class of JDefinedClass and JDirectClass. Then JDefinedClass is always generated class, while JDirectClass is always hidden.
The same should be applied to super class:
Problematic code: BIGlobalBinding.getSuperClass(), BIGlobalBinding.getSuperInterface().