Package net.bytebuddy.implementation
Interface MethodCall.TargetHandler
-
- All Superinterfaces:
InstrumentedType.Prepareable
- All Known Implementing Classes:
MethodCall.TargetHandler.ForConstructingInvocation,MethodCall.TargetHandler.ForField,MethodCall.TargetHandler.ForMethodParameter,MethodCall.TargetHandler.ForSelfOrStaticInvocation,MethodCall.TargetHandler.ForValue
- Enclosing class:
- MethodCall
protected static interface MethodCall.TargetHandler extends InstrumentedType.Prepareable
A target handler is responsible for invoking a method for aMethodCall.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classMethodCall.TargetHandler.ForConstructingInvocationInvokes a method in order to construct a new instance.static classMethodCall.TargetHandler.ForFieldCreates a target handler that stores the instance to invoke a method on in an instance field.static classMethodCall.TargetHandler.ForMethodParameterA target handler that loads the parameter of the given index as the target object.static classMethodCall.TargetHandler.ForSelfOrStaticInvocationA target handler that invokes a method either on the instance of the instrumented type or as a static method.static classMethodCall.TargetHandler.ForValueA target handler that invokes a method on an instance that is stored in a static field.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StackManipulationresolve(MethodDescription invokedMethod, MethodDescription instrumentedMethod, TypeDescription instrumentedType, Assigner assigner, Assigner.Typing typing)Creates a stack manipulation that represents the method's invocation.-
Methods inherited from interface net.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable
prepare
-
-
-
-
Method Detail
-
resolve
StackManipulation resolve(MethodDescription invokedMethod, MethodDescription instrumentedMethod, TypeDescription instrumentedType, Assigner assigner, Assigner.Typing typing)
Creates a stack manipulation that represents the method's invocation.- Parameters:
invokedMethod- The method to be invoked.instrumentedMethod- The instrumented method.instrumentedType- The instrumented type. @return A stack manipulation that invokes the method.assigner- The assigner to use.typing- The typing to apply.- Returns:
- A stack manipulation that loads the method target onto the operand stack.
-
-