Package net.bytebuddy.implementation
Class MethodCall.TargetHandler.ForMethodParameter
- java.lang.Object
-
- net.bytebuddy.implementation.MethodCall.TargetHandler.ForMethodParameter
-
- All Implemented Interfaces:
InstrumentedType.Prepareable
,MethodCall.TargetHandler
,MethodCall.TargetHandler.Factory
- Enclosing interface:
- MethodCall.TargetHandler
@Enhance public static class MethodCall.TargetHandler.ForMethodParameter extends java.lang.Object implements MethodCall.TargetHandler, MethodCall.TargetHandler.Factory
A target handler that loads the parameter of the given index as the target object.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
MethodCall.TargetHandler.ForMethodParameter.Resolved
A resolved target handler for a method parameter.-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.MethodCall.TargetHandler
MethodCall.TargetHandler.Factory, 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 int
index
The index of the instrumented method's parameter that is the target of the method invocation.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForMethodParameter(int index)
Creates a new target handler for the instrumented method's argument.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodCall.TargetHandler
make(Implementation.Target implementationTarget)
Creates a target handler for a given implementation target.InstrumentedType
prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.MethodCall.TargetHandler.Resolved
resolve(MethodDescription instrumentedMethod)
Resolves this target handler.
-
-
-
Method Detail
-
prepare
public InstrumentedType prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.- Specified by:
prepare
in interfaceInstrumentedType.Prepareable
- Parameters:
instrumentedType
- The instrumented type in its current form.- Returns:
- The prepared instrumented type.
-
make
public MethodCall.TargetHandler make(Implementation.Target implementationTarget)
Creates a target handler for a given implementation target.- Specified by:
make
in interfaceMethodCall.TargetHandler.Factory
- Parameters:
implementationTarget
- The implementation target to use.- Returns:
- The target handler to use.
-
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.
-
-