@Documented @Target(value=TYPE) @Retention(value=RUNTIME) public static @interface HashCodeAndEqualsPlugin.Enhance
HashCodeAndEqualsPlugin
to generate Object.hashCode()
and Object.equals(Object)
for the annotated
class unless these methods are already declared explicitly.Modifier and Type | Optional Element and Description |
---|---|
boolean |
includeSyntheticFields
Determines if synthetic fields should be included in the hash code and equality contract.
|
HashCodeAndEqualsPlugin.Enhance.InvokeSuper |
invokeSuper
Determines the base value of any added method, i.e.
|
boolean |
permitSubclassEquality
Determines if instances subclasses of the instrumented type are accepted upon an equality check.
|
boolean |
simpleComparisonsFirst
Determines if fields with primitive types, then enumeration types, then primtive wrapper types and then
String types
should be compared for equality before fields with other types. |
boolean |
useTypeHashConstant
Determines if the hash code constant should be derived of the instrumented type.
|
public abstract HashCodeAndEqualsPlugin.Enhance.InvokeSuper invokeSuper
public abstract boolean simpleComparisonsFirst
String
types
should be compared for equality before fields with other types. Before determining such a field order,
the HashCodeAndEqualsPlugin.Sorted
property is always considered first if it is defined.true
if fields with simple comparison methods should be compared first.public abstract boolean includeSyntheticFields
true
if synthetic fields should be included.public abstract boolean permitSubclassEquality
true
if instances subclasses of the instrumented type are accepted upon an equality check.public abstract boolean useTypeHashConstant
permitSubclassEquality()
is set to true
, this constant is derived of the declared class, otherwise the type hash is computed of the active instance.true
if the hash code constant should be derived of the instrumented type.Copyright © 2014–2024. All rights reserved.