Package net.bytebuddy.implementation
Enum MethodCall.MethodInvoker.ForDefaultMethodInvocation
- java.lang.Object
-
- java.lang.Enum<MethodCall.MethodInvoker.ForDefaultMethodInvocation>
-
- net.bytebuddy.implementation.MethodCall.MethodInvoker.ForDefaultMethodInvocation
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<MethodCall.MethodInvoker.ForDefaultMethodInvocation>
,MethodCall.MethodInvoker
- Enclosing interface:
- MethodCall.MethodInvoker
public static enum MethodCall.MethodInvoker.ForDefaultMethodInvocation extends java.lang.Enum<MethodCall.MethodInvoker.ForDefaultMethodInvocation> implements MethodCall.MethodInvoker
Invokes a method as a Java 8 default 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
ForDefaultMethodInvocation()
-
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.ForDefaultMethodInvocation
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static MethodCall.MethodInvoker.ForDefaultMethodInvocation[]
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.ForDefaultMethodInvocation INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static MethodCall.MethodInvoker.ForDefaultMethodInvocation[] 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.ForDefaultMethodInvocation c : MethodCall.MethodInvoker.ForDefaultMethodInvocation.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.ForDefaultMethodInvocation 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.
-
-