Great suggestion ! Thank you Nigel, Using the SerializableDecorator as a template I wrote this (really trivial) code:
--- public class ClassExtensionDecorator implements ClassDecorator { // injected by JIBX private String m_parentClass; @Override public void start(IClassHolder holder) { if (getParentClass() != null) { holder.addImport(getParentClass()); holder.setSuperClassName(getParentClass()); } } ... omissis ... } --- I tested it adding this statement to the CodeGen customization file: <class-decorator class="it.mate.jibx.extension.ClassExtensionDecorator" parent-class="it.mate.horus.model.BaseEntity"/> but the result is not as I expected: - the "import it.mate.horus.model.BaseEntity;" line is added correctly to the source but - the "extends it.mate.horus.model.BaseEntity" is missing from the class declaration statement it's evident that the method setSuperClassName(...) is not equivalent to the addInterface(...) method, so I'm still wondering how to continue ... my next attempt will be probably to try using the setSuperClass(...) method, but to use it I must have a ClassHolder object containing the "it.mate.horus.model.BaseEntity" class ... I suppose ... I browsed the source code but it looks not so sinple ... What I really need it would be a better knowledge on the code generation mechanism ... do you have any hint on wger to look for ? Thank you. Nigel Charman ha scritto: Hi Luca |
------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects
_______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users