Package net.bytebuddy.implementation
Enum MethodCall.MethodInvoker.ForContextualInvocation
- java.lang.Object
-
- java.lang.Enum<MethodCall.MethodInvoker.ForContextualInvocation>
-
- net.bytebuddy.implementation.MethodCall.MethodInvoker.ForContextualInvocation
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MethodCall.MethodInvoker.ForContextualInvocation>
,MethodCall.MethodInvoker
- Enclosing interface:
- MethodCall.MethodInvoker
public static enum MethodCall.MethodInvoker.ForContextualInvocation extends java.lang.Enum<MethodCall.MethodInvoker.ForContextualInvocation> implements MethodCall.MethodInvoker
Applies a contextual invocation of the provided method, i.e. a static invocation for static methods, a special invocation for constructors and private methods and a virtual invocation for any other method.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.MethodCall.MethodInvoker
MethodCall.MethodInvoker.ForContextualInvocation, MethodCall.MethodInvoker.ForDefaultMethodInvocation, MethodCall.MethodInvoker.ForSuperMethodInvocation, MethodCall.MethodInvoker.ForVirtualInvocation
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
The singleton instance.
-
Constructor Summary
Constructors Modifier Constructor Description private
ForContextualInvocation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StackManipulation
invoke(MethodDescription invokedMethod, Implementation.Target implementationTarget)
Invokes the method.static MethodCall.MethodInvoker.ForContextualInvocation
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MethodCall.MethodInvoker.ForContextualInvocation[]
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.MethodInvoker.ForContextualInvocation INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static MethodCall.MethodInvoker.ForContextualInvocation[] 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.MethodInvoker.ForContextualInvocation c : MethodCall.MethodInvoker.ForContextualInvocation.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.MethodInvoker.ForContextualInvocation 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
-
invoke
public StackManipulation invoke(MethodDescription invokedMethod, Implementation.Target implementationTarget)
Invokes the method.- Specified by:
invoke
in interfaceMethodCall.MethodInvoker
- Parameters:
invokedMethod
- The method to be invoked.implementationTarget
- The implementation target of the instrumented instance.- Returns:
- A stack manipulation that represents the method invocation.
-
-