|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.bind.v2.model.annotation.AbstractInlineAnnotationReaderImpl<com.sun.mirror.type.TypeMirror,com.sun.mirror.declaration.TypeDeclaration,com.sun.mirror.declaration.FieldDeclaration,com.sun.mirror.declaration.MethodDeclaration>
com.sun.tools.jxc.apt.InlineAnnotationReaderImpl
public final class InlineAnnotationReaderImpl
AnnotationReader
implementation that reads annotation inline from APT.
Field Summary | |
---|---|
static InlineAnnotationReaderImpl |
theInstance
The singleton instance. |
Method Summary | ||
---|---|---|
protected String |
fullName(com.sun.mirror.declaration.MethodDeclaration m)
Gets the fully-qualified name of the method. |
|
Annotation[] |
getAllFieldAnnotations(com.sun.mirror.declaration.FieldDeclaration field,
Locatable srcPos)
Gets all the annotations on a field. |
|
Annotation[] |
getAllMethodAnnotations(com.sun.mirror.declaration.MethodDeclaration method,
Locatable srcPos)
Gets all the annotations on a method. |
|
|
getClassAnnotation(Class<A> a,
com.sun.mirror.declaration.TypeDeclaration clazz,
Locatable srcPos)
Reads an annotation on a class. |
|
com.sun.mirror.type.TypeMirror[] |
getClassArrayValue(Annotation a,
String name)
Similar to AnnotationReader.getClassValue(Annotation, String) method but
obtains an array parameter. |
|
com.sun.mirror.type.TypeMirror |
getClassValue(Annotation a,
String name)
Reads a value of an annotation that returns a Class object. |
|
|
getFieldAnnotation(Class<A> a,
com.sun.mirror.declaration.FieldDeclaration f,
Locatable srcPos)
Reads an annotation on a property that consists of a field. |
|
|
getMethodAnnotation(Class<A> a,
com.sun.mirror.declaration.MethodDeclaration method,
Locatable srcPos)
|
|
|
getMethodParameterAnnotation(Class<A> a,
com.sun.mirror.declaration.MethodDeclaration m,
int paramIndex,
Locatable srcPos)
Reads an annotation on a parameter of the method. |
|
|
getPackageAnnotation(Class<A> a,
com.sun.mirror.declaration.TypeDeclaration clazz,
Locatable srcPos)
Reads an annotation on the package that the given class belongs to. |
|
boolean |
hasClassAnnotation(com.sun.mirror.declaration.TypeDeclaration clazz,
Class<? extends Annotation> annotationType)
Checks if a class has the annotation. |
|
boolean |
hasFieldAnnotation(Class<? extends Annotation> annotationType,
com.sun.mirror.declaration.FieldDeclaration f)
Checks if the given field has an annotation. |
|
boolean |
hasMethodAnnotation(Class<? extends Annotation> a,
com.sun.mirror.declaration.MethodDeclaration method)
|
Methods inherited from class com.sun.xml.bind.v2.model.annotation.AbstractInlineAnnotationReaderImpl |
---|
getErrorHandler, getMethodAnnotation, hasMethodAnnotation, setErrorHandler |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final InlineAnnotationReaderImpl theInstance
Method Detail |
---|
public <A extends Annotation> A getClassAnnotation(Class<A> a, com.sun.mirror.declaration.TypeDeclaration clazz, Locatable srcPos)
AnnotationReader
public <A extends Annotation> A getFieldAnnotation(Class<A> a, com.sun.mirror.declaration.FieldDeclaration f, Locatable srcPos)
AnnotationReader
public boolean hasFieldAnnotation(Class<? extends Annotation> annotationType, com.sun.mirror.declaration.FieldDeclaration f)
AnnotationReader
public boolean hasClassAnnotation(com.sun.mirror.declaration.TypeDeclaration clazz, Class<? extends Annotation> annotationType)
AnnotationReader
public Annotation[] getAllFieldAnnotations(com.sun.mirror.declaration.FieldDeclaration field, Locatable srcPos)
AnnotationReader
public <A extends Annotation> A getMethodAnnotation(Class<A> a, com.sun.mirror.declaration.MethodDeclaration method, Locatable srcPos)
public boolean hasMethodAnnotation(Class<? extends Annotation> a, com.sun.mirror.declaration.MethodDeclaration method)
public Annotation[] getAllMethodAnnotations(com.sun.mirror.declaration.MethodDeclaration method, Locatable srcPos)
AnnotationReader
srcPos
- the location from which this annotation is read.public <A extends Annotation> A getMethodParameterAnnotation(Class<A> a, com.sun.mirror.declaration.MethodDeclaration m, int paramIndex, Locatable srcPos)
AnnotationReader
public <A extends Annotation> A getPackageAnnotation(Class<A> a, com.sun.mirror.declaration.TypeDeclaration clazz, Locatable srcPos)
AnnotationReader
public com.sun.mirror.type.TypeMirror getClassValue(Annotation a, String name)
AnnotationReader
Depending on the underlying reflection library, you can't always
obtain the Class
object directly (see the APT MirrorTypeException
for example), so use this method to avoid that.
name
- The name of the annotation parameter to be read.public com.sun.mirror.type.TypeMirror[] getClassArrayValue(Annotation a, String name)
AnnotationReader
AnnotationReader.getClassValue(Annotation, String)
method but
obtains an array parameter.
protected String fullName(com.sun.mirror.declaration.MethodDeclaration m)
AbstractInlineAnnotationReaderImpl
fullName
in class AbstractInlineAnnotationReaderImpl<com.sun.mirror.type.TypeMirror,com.sun.mirror.declaration.TypeDeclaration,com.sun.mirror.declaration.FieldDeclaration,com.sun.mirror.declaration.MethodDeclaration>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |