Interface MethodInvocation.WithImplicitInvocationTargetType
- All Superinterfaces:
StackManipulation
- All Known Implementing Classes:
MethodInvocation.IllegalInvocation
,MethodInvocation.Invocation
,MethodInvocation.OfGenericMethod
- Enclosing class:
MethodInvocation
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.AbstractBase, StackManipulation.Compound, StackManipulation.Illegal, StackManipulation.Simple, StackManipulation.Size, StackManipulation.Trivial
-
Method Summary
Modifier and TypeMethodDescriptiondynamic
(String methodName, TypeDescription returnType, List<? extends TypeDescription> methodType, List<? extends JavaConstant> arguments) Invokes the method as a bootstrap method to bind a call site with the given properties.Invokes the method via aMethodHandle
.special
(TypeDescription invocationTarget) Transforms this method invocation into a special invocation on the given type.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 Details
-
virtual
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
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(String methodName, TypeDescription returnType, List<? extends TypeDescription> methodType, List<? extends JavaConstant> 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
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.
-