public static class MethodAttributeAppender.ForAnnotation extends Object implements MethodAttributeAppender, MethodAttributeAppender.Factory
RetentionPolicy
annotation.Modifier and Type | Class and Description |
---|---|
protected static interface |
MethodAttributeAppender.ForAnnotation.Target
Represents the target on which this method attribute appender should write its annotations to.
|
MethodAttributeAppender.Compound, MethodAttributeAppender.Factory, MethodAttributeAppender.ForAnnotation, MethodAttributeAppender.ForInstrumentedMethod, MethodAttributeAppender.ForMethod, MethodAttributeAppender.NoOp
MethodAttributeAppender.Factory.Compound
Constructor and Description |
---|
ForAnnotation(AnnotationAppender.ValueFilter valueFilter,
Annotation... annotation)
Creates a new appender for appending an annotation to a method parameter.
|
ForAnnotation(int parameterIndex,
AnnotationAppender.ValueFilter valueFilter,
Annotation... annotation)
Creates a new appender for appending an annotation to a method parameter.
|
ForAnnotation(int parameterIndex,
List<? extends AnnotationDescription> annotations,
AnnotationAppender.ValueFilter valueFilter)
Creates a new appender for appending an annotation to a method.
|
ForAnnotation(List<? extends AnnotationDescription> annotations,
AnnotationAppender.ValueFilter valueFilter)
Creates a new appender for appending an annotation to a method.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(MethodVisitor methodVisitor,
MethodDescription methodDescription)
Applies this attribute appender to a given method visitor.
|
boolean |
equals(Object other) |
int |
hashCode() |
MethodAttributeAppender |
make(TypeDescription typeDescription)
Returns a method attribute appender that is applicable for a given type description.
|
String |
toString() |
public ForAnnotation(int parameterIndex, AnnotationAppender.ValueFilter valueFilter, Annotation... annotation)
parameterIndex
- The index of the parameter to which the annotations should be written.valueFilter
- The value filter to apply for discovering which values of an annotation should be written.annotation
- The annotations that should be written.public ForAnnotation(AnnotationAppender.ValueFilter valueFilter, Annotation... annotation)
valueFilter
- The value filter to apply for discovering which values of an annotation should be written.annotation
- The annotations that should be written.public ForAnnotation(int parameterIndex, List<? extends AnnotationDescription> annotations, AnnotationAppender.ValueFilter valueFilter)
parameterIndex
- The index of the parameter to which the annotations should be written.annotations
- The annotations that should be written.valueFilter
- The value filter to apply for discovering which values of an annotation should be written.public ForAnnotation(List<? extends AnnotationDescription> annotations, AnnotationAppender.ValueFilter valueFilter)
annotations
- The annotations that should be written.valueFilter
- The value filter to apply for discovering which values of an annotation should be written.public void apply(MethodVisitor methodVisitor, MethodDescription methodDescription)
MethodAttributeAppender
apply
in interface MethodAttributeAppender
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.public MethodAttributeAppender make(TypeDescription typeDescription)
MethodAttributeAppender.Factory
make
in interface MethodAttributeAppender.Factory
typeDescription
- The type for which a method attribute appender is to be applied for.Copyright © 2014–2015. All rights reserved.