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 java.lang.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 Classes Modifier and Type Class Description protected static class
MethodCall.TargetHandler.ForMethodCall.Factory
Creates a factory for invoking a method on the return type of another method.protected static class
MethodCall.TargetHandler.ForMethodCall.Resolved
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
Fields Modifier and Type Field Description private MethodCall.Appender
appender
The appender that is the target of the using method call.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForMethodCall(MethodCall.Appender appender)
Creates a new target handler for another method call.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodCall.TargetHandler.Resolved
resolve(MethodDescription instrumentedMethod)
Resolves this target handler.
-
-
-
Field Detail
-
appender
private final MethodCall.Appender appender
The appender that is the target of the using method call.
-
-
Constructor Detail
-
ForMethodCall
protected ForMethodCall(MethodCall.Appender appender)
Creates a new target handler for another method call.- Parameters:
appender
- The appender that is the target of the using method call.
-
-
Method Detail
-
resolve
public MethodCall.TargetHandler.Resolved resolve(MethodDescription instrumentedMethod)
Resolves this target handler.- Specified by:
resolve
in interfaceMethodCall.TargetHandler
- Parameters:
instrumentedMethod
- The instrumented method.- Returns:
- The resolved target handler.
-
-