@HashCodeAndEqualsPlugin.Enhance(includeSyntheticFields=true) protected class MethodInvocation.Invocation extends Object implements MethodInvocation.WithImplicitInvocationTargetType
StackManipulation.Compound, StackManipulation.Illegal, StackManipulation.Simple, StackManipulation.Size, StackManipulation.Trivial| Modifier | Constructor and Description |
|---|---|
protected |
Invocation(MethodDescription.InDefinedShape methodDescription)
Creates an invocation of a given method on its declaring type as an invocation target.
|
protected |
Invocation(MethodDescription.InDefinedShape methodDescription,
TypeDescription typeDescription)
Creates an invocation of a given method on a given invocation target type.
|
| Modifier and Type | Method and Description |
|---|---|
StackManipulation.Size |
apply(org.objectweb.asm.MethodVisitor methodVisitor,
Implementation.Context implementationContext)
Applies the stack manipulation that is described by this instance.
|
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.
|
boolean |
isValid()
Determines if this stack manipulation is valid.
|
StackManipulation |
onHandle(MethodInvocation.HandleType type)
Invokes the method via a
MethodHandle. |
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.
|
protected Invocation(MethodDescription.InDefinedShape methodDescription)
methodDescription - The method to be invoked.protected Invocation(MethodDescription.InDefinedShape methodDescription, TypeDescription typeDescription)
methodDescription - The method to be invoked.typeDescription - The type on which this method is to be invoked.public boolean isValid()
isValid in interface StackManipulationfalse, this manipulation cannot be applied and should throw an exception.public StackManipulation.Size apply(org.objectweb.asm.MethodVisitor methodVisitor, Implementation.Context implementationContext)
apply in interface StackManipulationmethodVisitor - The method visitor used to write the method implementation to.implementationContext - The context of the current implementation.public StackManipulation virtual(TypeDescription invocationTarget)
virtual in interface MethodInvocation.WithImplicitInvocationTargetTypeinvocationTarget - The type on which the method is to be invoked virtually on.public StackManipulation special(TypeDescription invocationTarget)
special in interface MethodInvocation.WithImplicitInvocationTargetTypeinvocationTarget - The type on which the method is to be invoked specially on.public StackManipulation dynamic(String methodName, TypeDescription returnType, List<? extends TypeDescription> methodType, List<? extends JavaConstant> arguments)
dynamic in interface MethodInvocation.WithImplicitInvocationTargetTypemethodName - 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.public StackManipulation onHandle(MethodInvocation.HandleType type)
MethodHandle.onHandle in interface MethodInvocation.WithImplicitInvocationTargetTypetype - The type of invocation.Copyright © 2014–2021. All rights reserved.