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 classMethodCall.TargetHandler.ForMethodParameter.ResolvedA 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 intindexThe index of the instrumented method's parameter that is the target of the method invocation.
-
Constructor Summary
Constructors Modifier Constructor Description protectedForMethodParameter(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.TargetHandlermake(Implementation.Target implementationTarget)Creates a target handler for a given implementation target.InstrumentedTypeprepare(InstrumentedType instrumentedType)Prepares a given instrumented type.MethodCall.TargetHandler.Resolvedresolve(MethodDescription instrumentedMethod)Resolves this target handler.
-
-
-
Method Detail
-
prepare
public InstrumentedType prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.- Specified by:
preparein 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:
makein 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:
resolvein interfaceMethodCall.TargetHandler- Parameters:
instrumentedMethod- The instrumented method.- Returns:
- The resolved target handler.
-
-