Package net.bytebuddy.implementation
Class MethodCall.MethodInvoker.ForVirtualInvocation
- java.lang.Object
-
- net.bytebuddy.implementation.MethodCall.MethodInvoker.ForVirtualInvocation
-
- All Implemented Interfaces:
MethodCall.MethodInvoker
- Enclosing interface:
- MethodCall.MethodInvoker
@Enhance public static class MethodCall.MethodInvoker.ForVirtualInvocation extends java.lang.Object implements MethodCall.MethodInvoker
Applies a virtual invocation on a given type.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
MethodCall.MethodInvoker.ForVirtualInvocation.Factory
A method invoker factory for a virtual method invocation.protected static class
MethodCall.MethodInvoker.ForVirtualInvocation.WithImplicitType
A method invoker for a virtual method that uses an implicit target type.-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.MethodCall.MethodInvoker
MethodCall.MethodInvoker.ForContextualInvocation, MethodCall.MethodInvoker.ForDefaultMethodInvocation, MethodCall.MethodInvoker.ForSuperMethodInvocation, MethodCall.MethodInvoker.ForVirtualInvocation
-
-
Field Summary
Fields Modifier and Type Field Description private TypeDescription
typeDescription
The type description to virtually invoke the method upon.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForVirtualInvocation(TypeDescription typeDescription)
Creates a new method invoking for a virtual method invocation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StackManipulation
toStackManipulation(MethodDescription invokedMethod, Implementation.Target implementationTarget)
Invokes the method.
-
-
-
Field Detail
-
typeDescription
private final TypeDescription typeDescription
The type description to virtually invoke the method upon.
-
-
Constructor Detail
-
ForVirtualInvocation
protected ForVirtualInvocation(TypeDescription typeDescription)
Creates a new method invoking for a virtual method invocation.- Parameters:
typeDescription
- The type description to virtually invoke the method upon.
-
-
Method Detail
-
toStackManipulation
public StackManipulation toStackManipulation(MethodDescription invokedMethod, Implementation.Target implementationTarget)
Invokes the method.- Specified by:
toStackManipulation
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.
-
-