@HashCodeAndEqualsPlugin.Enhance public static class MethodCall.ArgumentLoader.ForMethodParameterArrayElement.OfParameter extends java.lang.Object implements MethodCall.ArgumentLoader.Factory, MethodCall.ArgumentLoader.ArgumentProvider
Modifier and Type | Field and Description |
---|---|
private int |
arrayIndex
The array index to load.
|
private int |
index
The parameter index.
|
Constructor and Description |
---|
OfParameter(int index,
int arrayIndex)
Creates a factory for an argument loader that loads a given parameter's array value.
|
Modifier and Type | Method and 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.
|
private final int index
private final int arrayIndex
public OfParameter(int index, int arrayIndex)
index
- The index of the parameter.arrayIndex
- The array index to load.public InstrumentedType prepare(InstrumentedType instrumentedType)
prepare
in interface InstrumentedType.Prepareable
instrumentedType
- The instrumented type in its current form.public MethodCall.ArgumentLoader.ArgumentProvider make(Implementation.Target implementationTarget)
make
in interface MethodCall.ArgumentLoader.Factory
implementationTarget
- The implementation target to use.public java.util.List<MethodCall.ArgumentLoader> resolve(MethodDescription instrumentedMethod, MethodDescription invokedMethod)
resolve
in interface MethodCall.ArgumentLoader.ArgumentProvider
instrumentedMethod
- The instrumented method.invokedMethod
- The invoked method.