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

1k views Asked by At

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?

1

There are 1 answers

2
bdoughan On