Package net.bytebuddy.build
Enum HashCodeAndEqualsPlugin.Enhance.InvokeSuper
- java.lang.Object
-
- java.lang.Enum<HashCodeAndEqualsPlugin.Enhance.InvokeSuper>
-
- net.bytebuddy.build.HashCodeAndEqualsPlugin.Enhance.InvokeSuper
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<HashCodeAndEqualsPlugin.Enhance.InvokeSuper>
- Enclosing class:
- HashCodeAndEqualsPlugin.Enhance
public static enum HashCodeAndEqualsPlugin.Enhance.InvokeSuper extends java.lang.Enum<HashCodeAndEqualsPlugin.Enhance.InvokeSuper>
A strategy for determining the base value of a hash code or equality contract.
-
-
Enum Constant Summary
Enum Constants Enum Constant 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 withHashCodeAndEqualsPlugin.Enhance
.IF_DECLARED
Only invokes the super method's hash code and equality methods if any super class that is notObject
explicitly defines such a method.NEVER
Never invokes the super class's hash code and equality methods.
-
Constructor Summary
Constructors Modifier Constructor Description private
InvokeSuper()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract EqualsMethod
equalsMethod(TypeDescription instrumentedType)
Resolves the equals method to use.protected abstract HashCodeMethod
hashCodeMethod(TypeDescription instrumentedType)
Resolves the hash code method to use.static HashCodeAndEqualsPlugin.Enhance.InvokeSuper
valueOf(java.lang.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.
-
-
-
Enum Constant Detail
-
IF_DECLARED
public static final HashCodeAndEqualsPlugin.Enhance.InvokeSuper IF_DECLARED
Only invokes the super method's hash code and equality methods if any super class that is notObject
explicitly defines such a method.
-
IF_ANNOTATED
public static final HashCodeAndEqualsPlugin.Enhance.InvokeSuper IF_ANNOTATED
Only invokes the super method's hash code and equality methods if the super class is also annotated withHashCodeAndEqualsPlugin.Enhance
.
-
ALWAYS
public static final HashCodeAndEqualsPlugin.Enhance.InvokeSuper ALWAYS
Always invokes the super class's hash code and equality methods.
-
NEVER
public static final HashCodeAndEqualsPlugin.Enhance.InvokeSuper NEVER
Never invokes the super class's hash code and equality methods.
-
-
Method Detail
-
values
public static HashCodeAndEqualsPlugin.Enhance.InvokeSuper[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (HashCodeAndEqualsPlugin.Enhance.InvokeSuper c : HashCodeAndEqualsPlugin.Enhance.InvokeSuper.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static HashCodeAndEqualsPlugin.Enhance.InvokeSuper valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
hashCodeMethod
protected abstract HashCodeMethod hashCodeMethod(TypeDescription instrumentedType)
Resolves the hash code method to use.- Parameters:
instrumentedType
- The instrumented type.- Returns:
- The hash code method to use.
-
equalsMethod
protected abstract EqualsMethod equalsMethod(TypeDescription instrumentedType)
Resolves the equals method to use.- Parameters:
instrumentedType
- The instrumented type.- Returns:
- The equals method to use.
-
-