Interface MethodInvocation.WithImplicitInvocationTargetType
-
- All Superinterfaces:
StackManipulation
- All Known Implementing Classes:
MethodInvocation.IllegalInvocation
,MethodInvocation.Invocation
,MethodInvocation.OfGenericMethod
- Enclosing class:
- MethodInvocation
public static interface MethodInvocation.WithImplicitInvocationTargetType extends StackManipulation
Represents a method invocation where the invocation type (static, virtual, special, interface) is derived from the given method's description.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.bytecode.StackManipulation
StackManipulation.Compound, StackManipulation.Illegal, StackManipulation.Size, StackManipulation.Trivial
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StackManipulation
dynamic(java.lang.String methodName, TypeDescription returnType, java.util.List<? extends TypeDescription> methodType, java.util.List<?> arguments)
Invokes the method as a bootstrap method to bind a call site with the given properties.StackManipulation
onHandle(MethodInvocation.HandleType type)
Invokes the method via aMethodHandle
.StackManipulation
special(TypeDescription invocationTarget)
Transforms this method invocation into a special invocation on the given type.StackManipulation
virtual(TypeDescription invocationTarget)
Transforms this method invocation into a virtual (or interface) method invocation on the given type.-
Methods inherited from interface net.bytebuddy.implementation.bytecode.StackManipulation
apply, isValid
-
-
-
-
Method Detail
-
virtual
StackManipulation virtual(TypeDescription invocationTarget)
Transforms this method invocation into a virtual (or interface) method invocation on the given type.- Parameters:
invocationTarget
- The type on which the method is to be invoked virtually on.- Returns:
- A stack manipulation representing this method invocation.
-
special
StackManipulation special(TypeDescription invocationTarget)
Transforms this method invocation into a special invocation on the given type.- Parameters:
invocationTarget
- The type on which the method is to be invoked specially on.- Returns:
- A stack manipulation representing this method invocation.
-
dynamic
StackManipulation dynamic(java.lang.String methodName, TypeDescription returnType, java.util.List<? extends TypeDescription> methodType, java.util.List<?> arguments)
Invokes the method as a bootstrap method to bind a call site with the given properties. Note that the Java virtual machine currently only knows how to resolve bootstrap methods that link static methods or a constructor.- Parameters:
methodName
- The name of the method to be bound.returnType
- The return type of the method to be bound.methodType
- The parameter types of the method to be bound.arguments
- The arguments to be passed to the bootstrap method.- Returns:
- A stack manipulation that represents the dynamic method invocation.
-
onHandle
StackManipulation onHandle(MethodInvocation.HandleType type)
Invokes the method via aMethodHandle
.- Parameters:
type
- The type of invocation.- Returns:
- A stack manipulation that represents a method call of the specified method via a method handle.
-
-