XJC is extensibility?

This question is related to JAXB2 type restriction not working? . I want to extend XJC to support type restrictions. This would be as simple as redefining superclassical field definitions.

Is there any way to do this right? Any hooks? Any similar tools?

+3
source share
1 answer

Yes , XJC is expanding with plugins:

What can a plugin do?

The JAXB RI plugin is involved in generating code from the circuit. It can define its own settings that users can use to manage it, it can access the code that RI JAXB generates, and it can generate additional classes / methods / fields / annotations / comments.

The plugin may also decide to create the entire XJC code process. Only one plugin can do this at any given time, but it allows the plugin to generate radically different code from the circuit.

Also see this answer:

What is the role of ClassOutline / JClass / CClass in CodeModel?

But no , I don’t think this is the right way to address the problem that you have.

Try to figure out the bindings or fix the circuit.

+2
source

Source: https://habr.com/ru/post/1443814/


All Articles