|
Java Annotation Indexer 1.0.0.Final | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.jandex.AnnotationInstance
public final class AnnotationInstance
An annotation instance represents a specific usage of an annotation on a target. It contains a set of values, as well as a reference to the target itself (e.g. class, field, method, etc).
Thread-Safety
This class is immutable and can be shared between threads without safe publication.
Method Summary | |
---|---|
static AnnotationInstance |
create(DotName name,
AnnotationTarget target,
AnnotationValue[] values)
Construct a new mock annotation instance. |
static AnnotationInstance |
create(DotName name,
AnnotationTarget target,
List<AnnotationValue> values)
Construct a new mock annotation instance. |
DotName |
name()
The name of this annotation in DotName form. |
AnnotationTarget |
target()
The Java element that this annotation was declared on. |
String |
toString()
|
AnnotationValue |
value()
Returns the value that is associated with the special default "value" parameter. |
AnnotationValue |
value(String name)
Returns a value that corresponds with the specified parameter name. |
List<AnnotationValue> |
values()
Returns a list of all parameter values on this annotation instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static final AnnotationInstance create(DotName name, AnnotationTarget target, AnnotationValue[] values)
name
- the name of the annotation instancetarget
- the thing the annotation is declared onvalues
- the values of this annotation instance
public static final AnnotationInstance create(DotName name, AnnotationTarget target, List<AnnotationValue> values)
name
- the name of the annotation instancetarget
- the thing the annotation is declared onvalues
- the values of this annotation instance
public DotName name()
public AnnotationTarget target()
public AnnotationValue value(String name)
name
- the parameter name
public AnnotationValue value()
public List<AnnotationValue> values()
public String toString()
toString
in class Object
|
Java Annotation Indexer 1.0.0.Final | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |