public class Annotations_c extends TypeObject_c implements Annotations
position, ts
Constructor and Description |
---|
Annotations_c(JL5TypeSystem ts,
Position pos) |
Annotations_c(java.util.Map<Type,java.util.Map<java.lang.String,AnnotationElementValue>> annotations,
JL5TypeSystem ts,
Position pos) |
Modifier and Type | Method and Description |
---|---|
java.util.Set<Type> |
annotationTypes()
The annotations that have been used.
|
java.util.Map<java.lang.String,AnnotationElementValue> |
elementValuePairs(Type annotationType)
Get the element value pairs for the given annotation type.
|
boolean |
hasAnnotationType(Type annotationType)
Do these annotations contain an annotation of the specified type?
If this method returns true, then annotationType is in the set
returned by this.annotationTypes().
|
boolean |
isCanonical()
Return true if the type object contains no unknown/ambiguous types.
|
java.util.Set<Type> |
retainedAnnotationTypes()
The annotations that have
a retention policy of annotation.RetentionPolicy.CLASS or
annotation.RetentionPolicy.RUNTIME.
|
AnnotationElementValue |
singleElement(Type annotationType)
If annotationType is a single element annotation type,
then return the element (or null if there is no
annotation for this annotation type).
|
copy, equals, equalsImpl, hashCode, position, typeSystem
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
equalsImpl, position, typeSystem
public Annotations_c(JL5TypeSystem ts, Position pos)
public Annotations_c(java.util.Map<Type,java.util.Map<java.lang.String,AnnotationElementValue>> annotations, JL5TypeSystem ts, Position pos)
public boolean isCanonical()
TypeObject
isCanonical
in interface TypeObject
public java.util.Set<Type> annotationTypes()
Annotations
annotationTypes
in interface Annotations
public java.util.Set<Type> retainedAnnotationTypes()
Annotations
retainedAnnotationTypes
in interface Annotations
public java.util.Map<java.lang.String,AnnotationElementValue> elementValuePairs(Type annotationType)
Annotations
elementValuePairs
in interface Annotations
public boolean hasAnnotationType(Type annotationType)
Annotations
hasAnnotationType
in interface Annotations
public AnnotationElementValue singleElement(Type annotationType)
Annotations
singleElement
in interface Annotations