Package net.bytebuddy.implementation
Class MethodCall.ArgumentLoader.ForMethodParameter.Factory
- java.lang.Object
-
- net.bytebuddy.implementation.MethodCall.ArgumentLoader.ForMethodParameter.Factory
-
- All Implemented Interfaces:
InstrumentedType.Prepareable
,MethodCall.ArgumentLoader.ArgumentProvider
,MethodCall.ArgumentLoader.Factory
- Enclosing class:
- MethodCall.ArgumentLoader.ForMethodParameter
@Enhance protected static class MethodCall.ArgumentLoader.ForMethodParameter.Factory extends java.lang.Object implements MethodCall.ArgumentLoader.Factory, MethodCall.ArgumentLoader.ArgumentProvider
A factory for an argument loader that supplies a method parameter as an argument.
-
-
Field Summary
Fields Modifier and Type Field Description private int
index
The index of the parameter to be loaded onto the operand stack.
-
Constructor Summary
Constructors Constructor Description Factory(int index)
Creates a factory for an argument loader that supplies a method parameter as an argument.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodCall.ArgumentLoader.ArgumentProvider
make(Implementation.Target implementationTarget)
Creates an argument provider for the supplied implementation target.InstrumentedType
prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.java.util.List<MethodCall.ArgumentLoader>
resolve(MethodDescription instrumentedMethod, MethodDescription invokedMethod)
Resolves this provider to an argument loader for each provided argument.
-
-
-
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.ArgumentLoader.ArgumentProvider make(Implementation.Target implementationTarget)
Creates an argument provider for the supplied implementation target.- Specified by:
make
in interfaceMethodCall.ArgumentLoader.Factory
- Parameters:
implementationTarget
- The implementation target to use.- Returns:
- An appropriate argument provider.
-
resolve
public java.util.List<MethodCall.ArgumentLoader> resolve(MethodDescription instrumentedMethod, MethodDescription invokedMethod)
Resolves this provider to an argument loader for each provided argument.- Specified by:
resolve
in interfaceMethodCall.ArgumentLoader.ArgumentProvider
- Parameters:
instrumentedMethod
- The instrumented method.invokedMethod
- The invoked method.- Returns:
- A list of provided argument loaders.
-
-