diff --git a/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java b/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java index be8f4f1ce..7551b0daa 100644 --- a/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java +++ b/src/main/java/org/apache/commons/lang3/builder/EqualsBuilder.java @@ -77,6 +77,9 @@ import org.apache.commons.lang3.tuple.Pair; * return EqualsBuilder.reflectionEquals(this, obj); * } * + * + *
The {@link EqualsExclude} annotation can be used to exclude fields from being
+ * used by the reflectionEquals
methods.
true
if the two Objects have tested equals.
+ *
+ * @see EqualsExclude
*/
public static boolean reflectionEquals(final Object lhs, final Object rhs, final Collectiontrue
if the two Objects have tested equals.
+ *
+ * @see EqualsExclude
*/
public static boolean reflectionEquals(final Object lhs, final Object rhs, final String... excludeFields) {
return reflectionEquals(lhs, rhs, false, null, excludeFields);
@@ -294,6 +301,8 @@ public class EqualsBuilder implements Buildertrue
if the two Objects have tested equals.
+ *
+ * @see EqualsExclude
*/
public static boolean reflectionEquals(final Object lhs, final Object rhs, final boolean testTransients) {
return reflectionEquals(lhs, rhs, testTransients, null);
@@ -324,6 +333,8 @@ public class EqualsBuilder implements Buildernull
* @param excludeFields array of field names to exclude from testing
* @return true
if the two Objects have tested equals.
+ *
+ * @see EqualsExclude
* @since 2.0
*/
public static boolean reflectionEquals(final Object lhs, final Object rhs, final boolean testTransients, final Class> reflectUpToClass,
diff --git a/src/main/java/org/apache/commons/lang3/builder/EqualsExclude.java b/src/main/java/org/apache/commons/lang3/builder/EqualsExclude.java
index 52edebb75..1ed29f05d 100755
--- a/src/main/java/org/apache/commons/lang3/builder/EqualsExclude.java
+++ b/src/main/java/org/apache/commons/lang3/builder/EqualsExclude.java
@@ -23,7 +23,9 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
- * Use this annotation to builds a equals excluding the annotated field.
+ * Use this annotation to exclude a field from being being used by
+ * the various reflectionEquals
methods defined on
+ * {@link EqualsBuilder}.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)