Plugin to declare generated classes implement existing interfaces

This is a very small and simple plugin to declare that certain complexTypes implements certain interfaces.

Usage

Run XJC with the parameters -extension and -Xinterfaces

In a global bindings file: <bindings xmlns:ext="http://xml.w_wins.com/xjc-plugins/interfaces" ... > <bindings schemaLocation="myschema.xsd" node="xsd:schema/xsd:complexType[@name='mycomplextype']"> <ext:interface>mypackage.MyExistingInterface</ext:interface> </bindings> </bindings>

Inline in a schema: <schema xmlns:ext="http://xml.w_wins.com/xjc-plugins/interfaces" ... > <complexType ...> <annotation> <appinfo> <ext:interface>mypackage.MyExistingInterface</ext:interface> </appinfo> </annotation> </complexType> </schema>

Note

The interfaces must be compiled and be in the classpath of XJC when it is run.

Download

Jar file with source and meta-info.

License

The source, compiled class, packaged jar file, and this html file, are all released to the public domain, or where not applicable, unlimited license to use, modify and redistribute, without conditions, is granted.