Package net.bytebuddy.asm
Enum MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort
- java.lang.Object
-
- java.lang.Enum<MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort>
-
- net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort>
protected static enum MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort extends java.lang.Enum<MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort>
The sort of the origin expression.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CONSTRUCTOR
Represents the supplied value as aConstructor
.EXECUTABLE
Represents the supplied value as ajava.lang.reflect.Executable
.FIELD
Represents the supplied value as aField
.LOOKUP
Represents the supplied value as ajava.lang.invoke.MethodHandles.Lookup
.METHOD
Represents the supplied value as aMethod
.METHOD_HANDLE
Represents the supplied value as ajava.lang.invoke.MethodHandle
.METHOD_TYPE
Represents the supplied value as ajava.lang.invoke.MethodType
.STRING
Represents the supplied value as itsObject.toString()
representation.TYPE
Represents the supplied value as aClass
.
-
Constructor Summary
Constructors Modifier Constructor Description private
Sort()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract boolean
isRepresentable(ByteCodeElement.Member original)
Checks if the supplied member can be represented by this sort.protected abstract StackManipulation
resolve(ByteCodeElement.Member original, java.util.List<TypeDescription> parameterTypes, TypeDescription returnType)
Creates a stack manipulation for the supplied byte code element.static MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
METHOD
public static final MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort METHOD
Represents the supplied value as aMethod
.
-
CONSTRUCTOR
public static final MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort CONSTRUCTOR
Represents the supplied value as aConstructor
.
-
FIELD
public static final MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort FIELD
Represents the supplied value as aField
.
-
EXECUTABLE
public static final MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort EXECUTABLE
Represents the supplied value as ajava.lang.reflect.Executable
.
-
TYPE
public static final MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort TYPE
Represents the supplied value as aClass
.
-
LOOKUP
public static final MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort LOOKUP
Represents the supplied value as ajava.lang.invoke.MethodHandles.Lookup
.
-
METHOD_HANDLE
public static final MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort METHOD_HANDLE
Represents the supplied value as ajava.lang.invoke.MethodHandle
.
-
METHOD_TYPE
public static final MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort METHOD_TYPE
Represents the supplied value as ajava.lang.invoke.MethodType
.
-
STRING
public static final MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort STRING
Represents the supplied value as itsObject.toString()
representation.
-
-
Method Detail
-
values
public static MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort[] 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 (MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort c : MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort 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
-
isRepresentable
protected abstract boolean isRepresentable(ByteCodeElement.Member original)
Checks if the supplied member can be represented by this sort.- Parameters:
original
- The byte code element to check.- Returns:
true
if the supplied element can be represented.
-
resolve
protected abstract StackManipulation resolve(ByteCodeElement.Member original, java.util.List<TypeDescription> parameterTypes, TypeDescription returnType)
Creates a stack manipulation for the supplied byte code element.- Parameters:
original
- The substituted element.parameterTypes
- The parameter types.returnType
- The return type.- Returns:
- A stack manipulation loading the supplied byte code element's representation onto the stack.
-
-