JAXB class ref prevent enum generation
Asked Answered
D

1

1

I've found this QA already and was able to prevent the generation of classes, but enums are still generated.

I've tried to prevent it with custom binding:

<jxb:bindings node="//xs:simpleType[@name='myEnum']">
      <jxb:class ref="com.myapp.enums.MyEnum" />
</jxb:bindings>

but it is not working for me. Is there any possibility to prevent the generation of enums or maybe another customization?

Duyne answered 8/8, 2016 at 8:10 Comment(0)
B
1

You must use following snippet

<jxb:bindings node="//xs:simpleType[@name='myEnum']">
      <jxb:typesafeEnumClass ref="com.myapp.enums.MyEnum"/>
</jxb:bindings>
Blather answered 8/8, 2016 at 9:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.