public static enum HashCodeAndEqualsPlugin.Enhance.InvokeSuper extends Enum<HashCodeAndEqualsPlugin.Enhance.InvokeSuper>
Enum Constant and Description |
---|
ALWAYS
Always invokes the super class's hash code and equality methods.
|
IF_ANNOTATED
Only invokes the super method's hash code and equality methods if the super class is also annotated with
HashCodeAndEqualsPlugin.Enhance . |
IF_DECLARED
Only invokes the super method's hash code and equality methods if any super class that is not
Object explicitly defines such a method. |
NEVER
Never invokes the super class's hash code and equality methods.
|
Modifier and Type | Method and Description |
---|---|
protected abstract EqualsMethod |
equalsMethod(TypeDescription instrumentedType)
Resolves the equals method to use.
|
protected abstract HashCodeMethod |
hashCodeMethod(TypeDescription instrumentedType,
boolean typeHash,
boolean subclassEquality)
Resolves the hash code method to use.
|
static HashCodeAndEqualsPlugin.Enhance.InvokeSuper |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HashCodeAndEqualsPlugin.Enhance.InvokeSuper[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HashCodeAndEqualsPlugin.Enhance.InvokeSuper IF_DECLARED
Object
explicitly defines such a method.public static final HashCodeAndEqualsPlugin.Enhance.InvokeSuper IF_ANNOTATED
HashCodeAndEqualsPlugin.Enhance
.public static final HashCodeAndEqualsPlugin.Enhance.InvokeSuper ALWAYS
public static final HashCodeAndEqualsPlugin.Enhance.InvokeSuper NEVER
public static HashCodeAndEqualsPlugin.Enhance.InvokeSuper[] values()
for (HashCodeAndEqualsPlugin.Enhance.InvokeSuper c : HashCodeAndEqualsPlugin.Enhance.InvokeSuper.values()) System.out.println(c);
public static HashCodeAndEqualsPlugin.Enhance.InvokeSuper valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullprotected abstract HashCodeMethod hashCodeMethod(TypeDescription instrumentedType, boolean typeHash, boolean subclassEquality)
instrumentedType
- The instrumented type.typeHash
- true
if the base hash should be based on the instrumented class's type.subclassEquality
- true
if subclasses can be equal to their base classes.protected abstract EqualsMethod equalsMethod(TypeDescription instrumentedType)
instrumentedType
- The instrumented type.Copyright © 2014–2024. All rights reserved.