Package net.bytebuddy.implementation
Class MethodCall.ArgumentLoader.ForMethodParameterArrayElement.OfParameter
java.lang.Object
net.bytebuddy.implementation.MethodCall.ArgumentLoader.ForMethodParameterArrayElement.OfParameter
- All Implemented Interfaces:
InstrumentedType.Prepareable,MethodCall.ArgumentLoader.ArgumentProvider,MethodCall.ArgumentLoader.Factory
- Enclosing class:
MethodCall.ArgumentLoader.ForMethodParameterArrayElement
@Enhance
public static class MethodCall.ArgumentLoader.ForMethodParameterArrayElement.OfParameter
extends Object
implements MethodCall.ArgumentLoader.Factory, MethodCall.ArgumentLoader.ArgumentProvider
Creates an argument loader for an array element that of a specific parameter.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable
InstrumentedType.Prepareable.NoOp -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe array index to load.private final intThe parameter index. -
Constructor Summary
ConstructorsConstructorDescriptionOfParameter(int index, int arrayIndex) Creates a factory for an argument loader that loads a given parameter's array value. -
Method Summary
Modifier and TypeMethodDescriptionmake(Implementation.Target implementationTarget) Creates an argument provider for the supplied implementation target.prepare(InstrumentedType instrumentedType) Prepares a given instrumented type.resolve(MethodDescription instrumentedMethod, MethodDescription invokedMethod) Resolves this provider to an argument loader for each provided argument.
-
Field Details
-
index
private final int indexThe parameter index. -
arrayIndex
private final int arrayIndexThe array index to load.
-
-
Constructor Details
-
OfParameter
public OfParameter(int index, int arrayIndex) Creates a factory for an argument loader that loads a given parameter's array value.- Parameters:
index- The index of the parameter.arrayIndex- The array index to load.
-
-
Method Details
-
prepare
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
Creates an argument provider for the supplied implementation target.- Specified by:
makein interfaceMethodCall.ArgumentLoader.Factory- Parameters:
implementationTarget- The implementation target to use.- Returns:
- An appropriate argument provider.
-
resolve
public List<MethodCall.ArgumentLoader> resolve(MethodDescription instrumentedMethod, MethodDescription invokedMethod) Resolves this provider to an argument loader for each provided argument.- Specified by:
resolvein interfaceMethodCall.ArgumentLoader.ArgumentProvider- Parameters:
instrumentedMethod- The instrumented method.invokedMethod- The invoked method.- Returns:
- A list of provided argument loaders.
-