users@jaxb.java.net

Re: hashCode and equals methods in generated classes

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Fri, 27 Oct 2006 11:20:08 +0200

Hi.

> Has anyone else developed a solution for generating equals and hashCode
> methods inside the generated classes since subclasses aren't an option:
>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6350739

There are two plugins to do that:

This one in jaxb2-commons uses reflection:

https://jaxb2-commons.dev.java.net/commons-lang-plugin/

This one from hyperjaxb3 generates expanded hashCode and equals which do not use
reflection:

https://hyperjaxb3.dev.java.net/docs/tools/plugin/index.html

Bye.
/lexi