Package net.bytebuddy.implementation
Enum Implementation.SpecialMethodInvocation.Illegal
- java.lang.Object
-
- java.lang.Enum<Implementation.SpecialMethodInvocation.Illegal>
-
- net.bytebuddy.implementation.Implementation.SpecialMethodInvocation.Illegal
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Implementation.SpecialMethodInvocation.Illegal>,StackManipulation,Implementation.SpecialMethodInvocation
- Enclosing interface:
- Implementation.SpecialMethodInvocation
public static enum Implementation.SpecialMethodInvocation.Illegal extends java.lang.Enum<Implementation.SpecialMethodInvocation.Illegal> implements Implementation.SpecialMethodInvocation
A canonical implementation of an illegalImplementation.SpecialMethodInvocation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.Implementation.SpecialMethodInvocation
Implementation.SpecialMethodInvocation.AbstractBase, Implementation.SpecialMethodInvocation.Illegal, Implementation.SpecialMethodInvocation.Simple
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bytecode.StackManipulation
StackManipulation.Compound, StackManipulation.Size, StackManipulation.Trivial
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCEThe singleton instance.
-
Constructor Summary
Constructors Modifier Constructor Description privateIllegal()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StackManipulation.Sizeapply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext)Applies the stack manipulation that is described by this instance.MethodDescriptiongetMethodDescription()Returns the method that represents this special method invocation.TypeDescriptiongetTypeDescription()Returns the target type the represented method is invoked on.booleanisValid()Determines if this stack manipulation is valid.JavaConstant.MethodHandletoMethodHandle()Returns a method handle representing this special method invocation.static Implementation.SpecialMethodInvocation.IllegalvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Implementation.SpecialMethodInvocation.Illegal[]values()Returns an array containing the constants of this enum type, in the order they are declared.Implementation.SpecialMethodInvocationwithCheckedCompatibilityTo(MethodDescription.TypeToken token)Checks that this special method invocation is compatible with the supplied type representation.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final Implementation.SpecialMethodInvocation.Illegal INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static Implementation.SpecialMethodInvocation.Illegal[] 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 (Implementation.SpecialMethodInvocation.Illegal c : Implementation.SpecialMethodInvocation.Illegal.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Implementation.SpecialMethodInvocation.Illegal 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
-
isValid
public boolean isValid()
Determines if this stack manipulation is valid.- Specified by:
isValidin interfaceStackManipulation- Returns:
- If
false, this manipulation cannot be applied and should throw an exception.
-
apply
public StackManipulation.Size apply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext)
Applies the stack manipulation that is described by this instance.- Specified by:
applyin interfaceStackManipulation- Parameters:
methodVisitor- The method visitor used to write the method implementation to.implementationContext- The context of the current implementation.- Returns:
- The changes to the size of the operand stack that are implied by this stack manipulation.
-
getMethodDescription
public MethodDescription getMethodDescription()
Returns the method that represents this special method invocation. This method can be different even for equal special method invocations, dependent on the method that was used to request such an invocation by the means of aImplementation.Target.- Specified by:
getMethodDescriptionin interfaceImplementation.SpecialMethodInvocation- Returns:
- The method description that describes this instances invocation target.
-
getTypeDescription
public TypeDescription getTypeDescription()
Returns the target type the represented method is invoked on.- Specified by:
getTypeDescriptionin interfaceImplementation.SpecialMethodInvocation- Returns:
- The type the represented method is invoked on.
-
withCheckedCompatibilityTo
public Implementation.SpecialMethodInvocation withCheckedCompatibilityTo(MethodDescription.TypeToken token)
Checks that this special method invocation is compatible with the supplied type representation.- Specified by:
withCheckedCompatibilityToin interfaceImplementation.SpecialMethodInvocation- Parameters:
token- The type token to check against.- Returns:
- This special method invocation or an illegal invocation if the method invocation is not applicable.
-
toMethodHandle
public JavaConstant.MethodHandle toMethodHandle()
Description copied from interface:Implementation.SpecialMethodInvocationReturns a method handle representing this special method invocation.- Specified by:
toMethodHandlein interfaceImplementation.SpecialMethodInvocation- Returns:
- A method handle for this special method invocation.
-
-