Package net.bytebuddy.implementation
Enum MethodCall.TargetHandler.ForSelfOrStaticInvocation
- java.lang.Object
-
- java.lang.Enum<MethodCall.TargetHandler.ForSelfOrStaticInvocation>
-
- net.bytebuddy.implementation.MethodCall.TargetHandler.ForSelfOrStaticInvocation
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MethodCall.TargetHandler.ForSelfOrStaticInvocation>
,InstrumentedType.Prepareable
,MethodCall.TargetHandler
- Enclosing interface:
- MethodCall.TargetHandler
public static enum MethodCall.TargetHandler.ForSelfOrStaticInvocation extends java.lang.Enum<MethodCall.TargetHandler.ForSelfOrStaticInvocation> implements MethodCall.TargetHandler
A target handler that invokes a method either on the instance of the instrumented type or as a static method.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.MethodCall.TargetHandler
MethodCall.TargetHandler.ForConstructingInvocation, MethodCall.TargetHandler.ForField, MethodCall.TargetHandler.ForMethodParameter, MethodCall.TargetHandler.ForSelfOrStaticInvocation, MethodCall.TargetHandler.ForValue
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
The singleton instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description InstrumentedType
prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.StackManipulation
resolve(MethodDescription invokedMethod, MethodDescription instrumentedMethod, TypeDescription instrumentedType, Assigner assigner, Assigner.Typing typing)
Creates a stack manipulation that represents the method's invocation.static MethodCall.TargetHandler.ForSelfOrStaticInvocation
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MethodCall.TargetHandler.ForSelfOrStaticInvocation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final MethodCall.TargetHandler.ForSelfOrStaticInvocation INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static MethodCall.TargetHandler.ForSelfOrStaticInvocation[] 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 (MethodCall.TargetHandler.ForSelfOrStaticInvocation c : MethodCall.TargetHandler.ForSelfOrStaticInvocation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MethodCall.TargetHandler.ForSelfOrStaticInvocation 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
public StackManipulation resolve(MethodDescription invokedMethod, MethodDescription instrumentedMethod, TypeDescription instrumentedType, Assigner assigner, Assigner.Typing typing)
Description copied from interface:MethodCall.TargetHandler
Creates a stack manipulation that represents the method's invocation.- Specified by:
resolve
in interfaceMethodCall.TargetHandler
- Parameters:
invokedMethod
- The method to be invoked.instrumentedMethod
- The instrumented method.instrumentedType
- The instrumented type. @return A stack manipulation that invokes the method.assigner
- The assigner to use.typing
- The typing to apply.- Returns:
- A stack manipulation that loads the method target onto the operand stack.
-
prepare
public InstrumentedType prepare(InstrumentedType instrumentedType)
Description copied from interface:InstrumentedType.Prepareable
Prepares a given instrumented type.- Specified by:
prepare
in interfaceInstrumentedType.Prepareable
- Parameters:
instrumentedType
- The instrumented type in its current form.- Returns:
- The prepared instrumented type.
-
-