Package net.bytebuddy.implementation
Class InvokeDynamic.InvocationProvider.ArgumentProvider.ForMethodParameter
java.lang.Object
net.bytebuddy.implementation.InvokeDynamic.InvocationProvider.ArgumentProvider.ForMethodParameter
- All Implemented Interfaces:
InvokeDynamic.InvocationProvider.ArgumentProvider
- Direct Known Subclasses:
InvokeDynamic.InvocationProvider.ArgumentProvider.ForMethodParameter.WithExplicitType
- Enclosing interface:
InvokeDynamic.InvocationProvider.ArgumentProvider
@Enhance
public static class InvokeDynamic.InvocationProvider.ArgumentProvider.ForMethodParameter
extends Object
implements InvokeDynamic.InvocationProvider.ArgumentProvider
An argument provider that loads an argument of the intercepted method.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
An argument provider for a method parameter with an explicit type.Nested classes/interfaces inherited from interface net.bytebuddy.implementation.InvokeDynamic.InvocationProvider.ArgumentProvider
InvokeDynamic.InvocationProvider.ArgumentProvider.ConstantPoolWrapper, InvokeDynamic.InvocationProvider.ArgumentProvider.ForBooleanConstant, InvokeDynamic.InvocationProvider.ArgumentProvider.ForByteConstant, InvokeDynamic.InvocationProvider.ArgumentProvider.ForCharacterConstant, InvokeDynamic.InvocationProvider.ArgumentProvider.ForClassConstant, InvokeDynamic.InvocationProvider.ArgumentProvider.ForDoubleConstant, InvokeDynamic.InvocationProvider.ArgumentProvider.ForEnumerationValue, InvokeDynamic.InvocationProvider.ArgumentProvider.ForField, InvokeDynamic.InvocationProvider.ArgumentProvider.ForFloatConstant, InvokeDynamic.InvocationProvider.ArgumentProvider.ForInstance, InvokeDynamic.InvocationProvider.ArgumentProvider.ForIntegerConstant, InvokeDynamic.InvocationProvider.ArgumentProvider.ForInterceptedMethodInstanceAndParameters, InvokeDynamic.InvocationProvider.ArgumentProvider.ForInterceptedMethodParameters, InvokeDynamic.InvocationProvider.ArgumentProvider.ForJavaConstant, InvokeDynamic.InvocationProvider.ArgumentProvider.ForLongConstant, InvokeDynamic.InvocationProvider.ArgumentProvider.ForMethodParameter, InvokeDynamic.InvocationProvider.ArgumentProvider.ForNullValue, InvokeDynamic.InvocationProvider.ArgumentProvider.ForShortConstant, InvokeDynamic.InvocationProvider.ArgumentProvider.ForStringConstant, InvokeDynamic.InvocationProvider.ArgumentProvider.ForThisInstance, InvokeDynamic.InvocationProvider.ArgumentProvider.Resolved
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ForMethodParameter
(int index) Creates an argument provider for an argument of the intercepted method. -
Method Summary
Modifier and TypeMethodDescriptiondoResolve
(StackManipulation access, TypeDescription.Generic type, Assigner assigner, Assigner.Typing typing) Resolves this argument provider.prepare
(InstrumentedType instrumentedType) Prepares the instrumented type.resolve
(TypeDescription instrumentedType, MethodDescription instrumentedMethod, Assigner assigner, Assigner.Typing typing) Resolves an argument provider.
-
Field Details
-
index
protected final int indexThe index of the parameter.
-
-
Constructor Details
-
ForMethodParameter
protected ForMethodParameter(int index) Creates an argument provider for an argument of the intercepted method.- Parameters:
index
- The index of the parameter.
-
-
Method Details
-
resolve
public InvokeDynamic.InvocationProvider.ArgumentProvider.Resolved resolve(TypeDescription instrumentedType, MethodDescription instrumentedMethod, Assigner assigner, Assigner.Typing typing) Resolves an argument provider.- Specified by:
resolve
in interfaceInvokeDynamic.InvocationProvider.ArgumentProvider
- Parameters:
instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.assigner
- The assigner to be used.typing
- Indicates if dynamic type castings should be attempted for incompatible assignments.- Returns:
- A resolved version of this argument provider.
-
doResolve
protected InvokeDynamic.InvocationProvider.ArgumentProvider.Resolved doResolve(StackManipulation access, TypeDescription.Generic type, Assigner assigner, Assigner.Typing typing) Resolves this argument provider.- Parameters:
access
- The stack manipulation for accessing the argument value.type
- The type of the loaded value.assigner
- The assigner to use.typing
- The typing required.- Returns:
- A resolved version of this arguments provider.
-
prepare
Prepares the instrumented type.- Specified by:
prepare
in interfaceInvokeDynamic.InvocationProvider.ArgumentProvider
- Parameters:
instrumentedType
- The instrumented type.- Returns:
- The prepared instrumented type.
-