Example usage for org.apache.commons.lang3.builder CompareToBuilder reflectionCompare

List of usage examples for org.apache.commons.lang3.builder CompareToBuilder reflectionCompare

Introduction

In this page you can find the example usage for org.apache.commons.lang3.builder CompareToBuilder reflectionCompare.

Prototype

public static int reflectionCompare(final Object lhs, final Object rhs, final String... excludeFields) 

Source Link

Document

Compares two Objects via reflection.

Fields can be private, thus AccessibleObject.setAccessible is used to bypass normal access control checks.

Usage

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"));
}