@@ -77,10 +77,10 @@ public enum PrimitiveDefaultValueMode
77
77
private final Collection <PropertyPath > includedProperties = new HashSet <PropertyPath >(10 );
78
78
private final Collection <PropertyPath > excludedProperties = new HashSet <PropertyPath >(10 );
79
79
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 );
81
81
private final Collection <Class <?>> compareToOnlyTypes = new LinkedHashSet <Class <?>>(10 );
82
82
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 );
84
84
private boolean returnUnchangedNodes = false ;
85
85
private boolean returnIgnoredNodes = false ;
86
86
private boolean returnCircularNodes = true ;
@@ -145,13 +145,13 @@ public Configuration withEqualsOnlyProperty(final PropertyPath propertyPath)
145
145
return this ;
146
146
}
147
147
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 ));
150
150
return this ;
151
151
}
152
152
153
- public Configuration withMethodEqualsProperty (PropertyPathAndMethod propertyPathEqualsMethod ) {
154
- this .methodEqualProperties .add (propertyPathEqualsMethod );
153
+ public Configuration withEqualsOnlyValueProviderMethod (PropertyPathAndMethod propertyPathEqualsMethod ) {
154
+ this .equalsOnlyValueProviderMethods .add (propertyPathEqualsMethod );
155
155
return this ;
156
156
}
157
157
@@ -322,52 +322,52 @@ public boolean isEqualsOnly(final Node node)
322
322
return false ;
323
323
}
324
324
325
- public boolean isWithMethodEquals (Node node ){
326
- return getWithMethodEqualsMethod (node ) != null ;
325
+ public boolean hasEqualsOnlyValueProviderMethod (Node node ){
326
+ return getEqualsOnlyValueProviderMethod (node ) != null ;
327
327
}
328
328
329
- public String getWithMethodEqualsMethod (Node node ){
329
+ public String getEqualsOnlyValueProviderMethod (Node node ){
330
330
final Class <?> propertyType = node .getType ();
331
331
if (propertyType != null )
332
332
{
333
- ObjectDiffMethodEqualsType annotation = propertyType .getAnnotation (ObjectDiffMethodEqualsType .class );
333
+ ObjectDiffEqualsOnlyValueProvidedType annotation = propertyType .getAnnotation (ObjectDiffEqualsOnlyValueProvidedType .class );
334
334
if (annotation != null )
335
335
{
336
336
return annotation .method ();
337
337
}
338
338
339
- ClassAndMethod applicable = findMethodEqualPropertyForClass (propertyType );
339
+ ClassAndMethod applicable = findEqualsOnlyValueProviderMethodForClass (propertyType );
340
340
if (applicable != null )
341
341
{
342
342
return applicable .getMethod ();
343
343
}
344
344
}
345
- if (node .isWithMethodEquals ())
345
+ if (node .hasEqualsOnlyValueProviderMethod ())
346
346
{
347
- return node .getWithMethodEqualsMethod ();
347
+ return node .getEqualsOnlyValueProviderMethod ();
348
348
}
349
- PropertyPathAndMethod applicable = findMethodEqualPropertyForPath (node .getPropertyPath ());
349
+ PropertyPathAndMethod applicable = findEqualsOnlyValueProviderMethodForPath (node .getPropertyPath ());
350
350
if (applicable != null )
351
351
{
352
352
return applicable .getMethod ();
353
353
}
354
354
return null ;
355
355
}
356
356
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 ;
361
361
}
362
362
}
363
363
return null ;
364
364
365
365
}
366
366
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 ;
371
371
}
372
372
}
373
373
return null ;
0 commit comments