Class MethodAttributeAppender.Explicit.Target.OnMethodParameter
java.lang.Object
net.bytebuddy.implementation.attribute.MethodAttributeAppender.Explicit.Target.OnMethodParameter
- All Implemented Interfaces:
MethodAttributeAppender.Explicit.Target
- Enclosing interface:
MethodAttributeAppender.Explicit.Target
@Enhance
public static class MethodAttributeAppender.Explicit.Target.OnMethodParameter
extends Object
implements MethodAttributeAppender.Explicit.Target
A method attribute appender target for writing annotations onto a given method parameter.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.attribute.MethodAttributeAppender.Explicit.Target
MethodAttributeAppender.Explicit.Target.OnMethod, MethodAttributeAppender.Explicit.Target.OnMethodParameter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
The index of the parameter to write the annotation to. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
OnMethodParameter
(int parameterIndex) Creates a target for a method attribute appender for a method parameter of the given index. -
Method Summary
Modifier and TypeMethodDescriptionmake
(org.objectweb.asm.MethodVisitor methodVisitor, MethodDescription methodDescription) Materializes the target for a given creation process.
-
Field Details
-
parameterIndex
private final int parameterIndexThe index of the parameter to write the annotation to.
-
-
Constructor Details
-
OnMethodParameter
protected OnMethodParameter(int parameterIndex) Creates a target for a method attribute appender for a method parameter of the given index.- Parameters:
parameterIndex
- The index of the target parameter.
-
-
Method Details
-
make
public AnnotationAppender.Target make(org.objectweb.asm.MethodVisitor methodVisitor, MethodDescription methodDescription) Materializes the target for a given creation process.- Specified by:
make
in interfaceMethodAttributeAppender.Explicit.Target
- Parameters:
methodVisitor
- The method visitor to which the attributes that are represented by this attribute appender are written to.methodDescription
- The description of the method for which the given method visitor creates an instrumentation for.- Returns:
- The target of the annotation appender this target represents.
-