Package net.bytebuddy.implementation
Enum EqualsMethod.TypeCompatibilityCheck
- java.lang.Object
-
- java.lang.Enum<EqualsMethod.TypeCompatibilityCheck>
-
- net.bytebuddy.implementation.EqualsMethod.TypeCompatibilityCheck
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<EqualsMethod.TypeCompatibilityCheck>
- Enclosing class:
- EqualsMethod
protected static enum EqualsMethod.TypeCompatibilityCheck extends java.lang.Enum<EqualsMethod.TypeCompatibilityCheck>
Checks the overall type of the provided argument.
-
-
Field Summary
Fields Modifier and Type Field Description protected static MethodDescription.InDefinedShape
GET_CLASS
TheObject.getClass()
method.
-
Constructor Summary
Constructors Modifier Constructor Description private
TypeCompatibilityCheck()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract StackManipulation
resolve(TypeDescription instrumentedType)
Resolves a stack manipulation for the required type compatibility check.static EqualsMethod.TypeCompatibilityCheck
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static EqualsMethod.TypeCompatibilityCheck[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
EXACT
public static final EqualsMethod.TypeCompatibilityCheck EXACT
Requires an exact type match.
-
SUBCLASS
public static final EqualsMethod.TypeCompatibilityCheck SUBCLASS
Requires a subtype relationship.
-
-
Field Detail
-
GET_CLASS
protected static final MethodDescription.InDefinedShape GET_CLASS
TheObject.getClass()
method.
-
-
Method Detail
-
values
public static EqualsMethod.TypeCompatibilityCheck[] 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 (EqualsMethod.TypeCompatibilityCheck c : EqualsMethod.TypeCompatibilityCheck.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EqualsMethod.TypeCompatibilityCheck 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
-
resolve
protected abstract StackManipulation resolve(TypeDescription instrumentedType)
Resolves a stack manipulation for the required type compatibility check.- Parameters:
instrumentedType
- The instrumented type.- Returns:
- A stack manipulation that implements the specified check.
-
-