public static class MethodAttributeAppender.Explicit extends Object implements MethodAttributeAppender, MethodAttributeAppender.Factory
RetentionPolicy annotation.| Modifier and Type | Class and Description |
|---|---|
protected static interface |
MethodAttributeAppender.Explicit.Target
Represents the target on which this method attribute appender should write its annotations to.
|
MethodAttributeAppender.Compound, MethodAttributeAppender.Explicit, MethodAttributeAppender.Factory, MethodAttributeAppender.ForInstrumentedMethod, MethodAttributeAppender.ForReceiverType, MethodAttributeAppender.NoOpMethodAttributeAppender.Factory.Compound| Modifier | Constructor and Description |
|---|---|
|
Explicit(int parameterIndex,
List<? extends AnnotationDescription> annotations)
Creates a new appender for appending an annotation to a method.
|
|
Explicit(List<? extends AnnotationDescription> annotations)
Creates a new appender for appending an annotation to a method.
|
protected |
Explicit(MethodAttributeAppender.Explicit.Target target,
List<? extends AnnotationDescription> annotations)
Creates an explicit annotation appender for a either a method or one of its parameters..
|
| Modifier and Type | Method and Description |
|---|---|
void |
apply(MethodVisitor methodVisitor,
MethodDescription methodDescription,
AnnotationValueFilter annotationValueFilter)
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.
|
static MethodAttributeAppender.Factory |
of(MethodDescription methodDescription)
Creates a method attribute appender factory that writes all annotations of a given method, both the method
annotations themselves and all annotations that are defined for every parameter.
|
String |
toString() |
public Explicit(int parameterIndex,
List<? extends AnnotationDescription> annotations)
parameterIndex - The index of the parameter to which the annotations should be written.annotations - The annotations that should be written.public Explicit(List<? extends AnnotationDescription> annotations)
annotations - The annotations that should be written.protected Explicit(MethodAttributeAppender.Explicit.Target target, List<? extends AnnotationDescription> annotations)
target - The target to which the annotation should be written to.annotations - The annotations to write.public static MethodAttributeAppender.Factory of(MethodDescription methodDescription)
methodDescription - The method from which to extract the annotations.public MethodAttributeAppender make(TypeDescription typeDescription)
MethodAttributeAppender.Factorymake in interface MethodAttributeAppender.FactorytypeDescription - The type for which a method attribute appender is to be applied for.public void apply(MethodVisitor methodVisitor, MethodDescription methodDescription, AnnotationValueFilter annotationValueFilter)
MethodAttributeAppenderapply in interface MethodAttributeAppendermethodVisitor - 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.annotationValueFilter - The annotation value filter to apply when the annotations are written.Copyright © 2014–2016. All rights reserved.