Class MethodInvocation.DynamicInvocation
java.lang.Object
net.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase
net.bytebuddy.implementation.bytecode.member.MethodInvocation.DynamicInvocation
- All Implemented Interfaces:
StackManipulation
- Enclosing class:
MethodInvocation
@Enhance(includeSyntheticFields=true)
protected class MethodInvocation.DynamicInvocation
extends StackManipulation.AbstractBase
Performs a dynamic method invocation of the given method.
-
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 -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<? extends JavaConstant> The list of arguments to be handed over to the bootstrap method.private final MethodDescription.InDefinedShapeThe bootstrap method.private final StringThe internal name of the method that is to be bootstrapped.private final List<? extends TypeDescription> The parameter types of the method to be bootstrapped.private final TypeDescriptionThe return type of the method to be bootstrapped. -
Constructor Summary
ConstructorsConstructorDescriptionDynamicInvocation(String methodName, TypeDescription returnType, List<? extends TypeDescription> parameterTypes, MethodDescription.InDefinedShape bootstrapMethod, List<? extends JavaConstant> arguments) Creates a new dynamic method invocation. -
Method Summary
Modifier and TypeMethodDescriptionapply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext) Applies the stack manipulation that is described by this instance.Methods inherited from class net.bytebuddy.implementation.bytecode.StackManipulation.AbstractBase
isValid
-
Field Details
-
methodName
The internal name of the method that is to be bootstrapped. -
returnType
The return type of the method to be bootstrapped. -
parameterTypes
The parameter types of the method to be bootstrapped. -
bootstrapMethod
The bootstrap method. -
arguments
The list of arguments to be handed over to the bootstrap method.
-
-
Constructor Details
-
DynamicInvocation
public DynamicInvocation(String methodName, TypeDescription returnType, List<? extends TypeDescription> parameterTypes, MethodDescription.InDefinedShape bootstrapMethod, List<? extends JavaConstant> arguments) Creates a new dynamic method invocation.- Parameters:
methodName- The internal name of the method that is to be bootstrapped.returnType- The return type of the method to be bootstrapped.parameterTypes- The type of the parameters to be bootstrapped.bootstrapMethod- The bootstrap method.arguments- The list of arguments to be handed over to the bootstrap method.
-
-
Method Details
-
apply
public StackManipulation.Size apply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext) Applies the stack manipulation that is described by this instance.- Parameters:
methodVisitor- The method visitor used to write the method implementation to.implementationContext- The context of the current implementation.- Returns:
- The changes to the size of the operand stack that are implied by this stack manipulation.
-