If you know EqualsBuilder from apache commons lang you know that you can use it for implementing equals methods with reflection. It seems to work well but since I am using third party software I need to change its behavior. I need a generic comparator which checks all attributes and it can not be assumed that attribut-objects have an implemented equals method, but EqualsBuilder assumes it.
In detail I want to change public EqualsBuilder append(Object lhs, Object rhs)
so that instead of calling isEquals = lhs.equals(rhs)
EqualsBuilder should be used for this object too. Something like isEquals = EqualsBuilder.reflectionEquals(lhs, rhs, false);
Overriding the method is possible but it will not be called because EqualsBuilder creates an object of its own. Therefore I need to tell EqualBuilder to use my RecursiveEquilbuilder object.
Any ideas?