Reputation: 651
I have 2 .xsd
files and am using cxf-xjc-plugin
to generate Java classes. However, I haven't found the solution for comparing (ie by invoking the equals()
method) 2 classes with nested classes. I don't use another plugin.
How I should fixed it?
Upvotes: 2
Views: 688
Reputation: 20442
JAXB generated classes do not have equals
or hashcode
implementations. In order to support generating that code, additional information would need to be added to the schemas. There are other libraries, like JAXB2 Basics which do support generating an equals()
method.
Upvotes: 2