Package net.bytebuddy.implementation
Class MethodCall.TargetHandler.ForMethodCall
java.lang.Object
net.bytebuddy.implementation.MethodCall.TargetHandler.ForMethodCall
- All Implemented Interfaces:
MethodCall.TargetHandler
- Enclosing interface:
MethodCall.TargetHandler
@Enhance
public static class MethodCall.TargetHandler.ForMethodCall
extends Object
implements MethodCall.TargetHandler
A target handler that executes the method and uses it's return value as the target object.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
Creates a factory for invoking a method on the return type of another method.protected static class
A resolved target handler for a method call.Nested classes/interfaces inherited from interface net.bytebuddy.implementation.MethodCall.TargetHandler
MethodCall.TargetHandler.ForConstructingInvocation, MethodCall.TargetHandler.ForField, MethodCall.TargetHandler.ForMethodCall, MethodCall.TargetHandler.ForMethodParameter, MethodCall.TargetHandler.ForSelfOrStaticInvocation, MethodCall.TargetHandler.ForValue, MethodCall.TargetHandler.Simple
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MethodCall.Appender
The appender that is the target of the using method call. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ForMethodCall
(MethodCall.Appender appender) Creates a new target handler for another method call. -
Method Summary
Modifier and TypeMethodDescriptionresolve
(MethodDescription instrumentedMethod) Resolves this target handler.
-
Field Details
-
appender
The appender that is the target of the using method call.
-
-
Constructor Details
-
ForMethodCall
Creates a new target handler for another method call.- Parameters:
appender
- The appender that is the target of the using method call.
-
-
Method Details
-
resolve
Resolves this target handler.- Specified by:
resolve
in interfaceMethodCall.TargetHandler
- Parameters:
instrumentedMethod
- The instrumented method.- Returns:
- The resolved target handler.
-