@@ -77,10 +77,10 @@ public enum PrimitiveDefaultValueMode
7777 private final Collection <PropertyPath > includedProperties = new HashSet <PropertyPath >(10 );
7878 private final Collection <PropertyPath > excludedProperties = new HashSet <PropertyPath >(10 );
7979 private final Collection <PropertyPath > equalsOnlyProperties = new LinkedHashSet <PropertyPath >(10 );
80- private final Collection <PropertyPathAndMethod > methodEqualProperties = new LinkedHashSet <PropertyPathAndMethod >(10 );
80+ private final Collection <PropertyPathAndMethod > equalsOnlyValueProviderMethods = new LinkedHashSet <PropertyPathAndMethod >(10 );
8181 private final Collection <Class <?>> compareToOnlyTypes = new LinkedHashSet <Class <?>>(10 );
8282 private final Collection <Class <?>> equalsOnlyTypes = new LinkedHashSet <Class <?>>(10 );
83- private final Collection <ClassAndMethod > methodEqualTypes = new LinkedHashSet <ClassAndMethod >(10 );
83+ private final Collection <ClassAndMethod > equalsOnlyValueProviderTypes = new LinkedHashSet <ClassAndMethod >(10 );
8484 private boolean returnUnchangedNodes = false ;
8585 private boolean returnIgnoredNodes = false ;
8686 private boolean returnCircularNodes = true ;
@@ -145,13 +145,13 @@ public Configuration withEqualsOnlyProperty(final PropertyPath propertyPath)
145145 return this ;
146146 }
147147
148- public Configuration withMethodEqualsProperty (final PropertyPath propertyPath , final String methodName ) {
149- this .methodEqualProperties .add (new PropertyPathAndMethod (propertyPath , methodName ));
148+ public Configuration withEqualsOnlyValueProviderMethod (final PropertyPath propertyPath , final String methodName ) {
149+ this .equalsOnlyValueProviderMethods .add (new PropertyPathAndMethod (propertyPath , methodName ));
150150 return this ;
151151 }
152152
153- public Configuration withMethodEqualsProperty (PropertyPathAndMethod propertyPathEqualsMethod ) {
154- this .methodEqualProperties .add (propertyPathEqualsMethod );
153+ public Configuration withEqualsOnlyValueProviderMethod (PropertyPathAndMethod propertyPathEqualsMethod ) {
154+ this .equalsOnlyValueProviderMethods .add (propertyPathEqualsMethod );
155155 return this ;
156156 }
157157
@@ -322,52 +322,52 @@ public boolean isEqualsOnly(final Node node)
322322 return false ;
323323 }
324324
325- public boolean isWithMethodEquals (Node node ){
326- return getWithMethodEqualsMethod (node ) != null ;
325+ public boolean hasEqualsOnlyValueProviderMethod (Node node ){
326+ return getEqualsOnlyValueProviderMethod (node ) != null ;
327327 }
328328
329- public String getWithMethodEqualsMethod (Node node ){
329+ public String getEqualsOnlyValueProviderMethod (Node node ){
330330 final Class <?> propertyType = node .getType ();
331331 if (propertyType != null )
332332 {
333- ObjectDiffMethodEqualsType annotation = propertyType .getAnnotation (ObjectDiffMethodEqualsType .class );
333+ ObjectDiffEqualsOnlyValueProvidedType annotation = propertyType .getAnnotation (ObjectDiffEqualsOnlyValueProvidedType .class );
334334 if (annotation != null )
335335 {
336336 return annotation .method ();
337337 }
338338
339- ClassAndMethod applicable = findMethodEqualPropertyForClass (propertyType );
339+ ClassAndMethod applicable = findEqualsOnlyValueProviderMethodForClass (propertyType );
340340 if (applicable != null )
341341 {
342342 return applicable .getMethod ();
343343 }
344344 }
345- if (node .isWithMethodEquals ())
345+ if (node .hasEqualsOnlyValueProviderMethod ())
346346 {
347- return node .getWithMethodEqualsMethod ();
347+ return node .getEqualsOnlyValueProviderMethod ();
348348 }
349- PropertyPathAndMethod applicable = findMethodEqualPropertyForPath (node .getPropertyPath ());
349+ PropertyPathAndMethod applicable = findEqualsOnlyValueProviderMethodForPath (node .getPropertyPath ());
350350 if (applicable != null )
351351 {
352352 return applicable .getMethod ();
353353 }
354354 return null ;
355355 }
356356
357- private ClassAndMethod findMethodEqualPropertyForClass (Class <?> clazz ){
358- for (ClassAndMethod propertyPathEqualsMethod : methodEqualTypes ){
359- if (clazz .equals (propertyPathEqualsMethod .getClazz ())){
360- return propertyPathEqualsMethod ;
357+ private ClassAndMethod findEqualsOnlyValueProviderMethodForClass (Class <?> clazz ){
358+ for (ClassAndMethod propertyPathEqualsOnValueProviderType : equalsOnlyValueProviderTypes ){
359+ if (clazz .equals (propertyPathEqualsOnValueProviderType .getClazz ())){
360+ return propertyPathEqualsOnValueProviderType ;
361361 }
362362 }
363363 return null ;
364364
365365 }
366366
367- private PropertyPathAndMethod findMethodEqualPropertyForPath (PropertyPath propertyPath ){
368- for (PropertyPathAndMethod propertyPathEqualsMethod : methodEqualProperties ){
369- if (propertyPath .equals (propertyPathEqualsMethod .getPropertyPath ())){
370- return propertyPathEqualsMethod ;
367+ private PropertyPathAndMethod findEqualsOnlyValueProviderMethodForPath (PropertyPath propertyPath ){
368+ for (PropertyPathAndMethod propertyPathEqualsOnValueProviderMethod : equalsOnlyValueProviderMethods ){
369+ if (propertyPath .equals (propertyPathEqualsOnValueProviderMethod .getPropertyPath ())){
370+ return propertyPathEqualsOnValueProviderMethod ;
371371 }
372372 }
373373 return null ;
0 commit comments