简体   繁体   中英

generate Java classes from DTD with equals() and hashCode() methods

I'm get used using XJC tool from command line. But I realized that I'm not able to generate Java classes with equals() and hashCode() methods using it. I used this:

xjc -dtd -d directory -p com.example.package file.dtd

I don't know how to generate the methods. My version is:

xjc version "JAXB 2.1.10 in JDK 6" 
JavaTM Architecture for XML Binding(JAXB) Reference Implementation, (build JAXB 2.1.10 in JDK 6)

1. Is it possible to generate equals() and hashCode() methods from a DTD file with XJC tool?

Moreover, I know I can use Maven plugins to achieve this kind of goals. I'm very happy with The CXF XJC Maven Plugin . I would be very happy if I can do the same job with this Maven plugin.

1. Is it possible to generate equals() and hashCode() methods from a DTD file with The CXF XJC Maven Plugin?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM