List of usage examples for org.apache.commons.lang3.builder CompareToBuilder reflectionCompare
public static int reflectionCompare(final Object lhs, final Object rhs, final String... excludeFields)
Compares two Objects via reflection.
Fields can be private, thus AccessibleObject.setAccessible is used to bypass normal access control checks.
From source file:org.eclipse.recommenders.internal.utils.codestructs.Variable.java
@Override public int compareTo(final Variable other) { return CompareToBuilder.reflectionCompare(this, other, Lists.newArrayList("type", "pointsTo")); }