public final class InlineAnnotationReaderImpl extends AbstractInlineAnnotationReaderImpl<TypeMirror,TypeElement,VariableElement,ExecutableElement>
AnnotationReader implementation that reads annotation inline from Annoation Processing.| Modifier and Type | Field and Description |
|---|---|
static InlineAnnotationReaderImpl |
theInstance
The singleton instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
fullName(ExecutableElement m)
Gets the fully-qualified name of the method.
|
Annotation[] |
getAllFieldAnnotations(VariableElement field,
Locatable srcPos)
Gets all the annotations on a field.
|
Annotation[] |
getAllMethodAnnotations(ExecutableElement method,
Locatable srcPos)
Gets all the annotations on a method.
|
<A extends Annotation> |
getClassAnnotation(Class<A> a,
TypeElement clazz,
Locatable srcPos)
Reads an annotation on a class.
|
TypeMirror[] |
getClassArrayValue(Annotation a,
String name)
Similar to
AnnotationReader.getClassValue(Annotation, String) method but
obtains an array parameter. |
TypeMirror |
getClassValue(Annotation a,
String name)
Reads a value of an annotation that returns a Class object.
|
<A extends Annotation> |
getFieldAnnotation(Class<A> a,
VariableElement f,
Locatable srcPos)
Reads an annotation on a property that consists of a field.
|
<A extends Annotation> |
getMethodAnnotation(Class<A> a,
ExecutableElement method,
Locatable srcPos) |
<A extends Annotation> |
getMethodParameterAnnotation(Class<A> a,
ExecutableElement m,
int paramIndex,
Locatable srcPos)
Reads an annotation on a parameter of the method.
|
<A extends Annotation> |
getPackageAnnotation(Class<A> a,
TypeElement clazz,
Locatable srcPos)
Reads an annotation on the package that the given class belongs to.
|
boolean |
hasClassAnnotation(TypeElement clazz,
Class<? extends Annotation> annotationType)
Checks if a class has the annotation.
|
boolean |
hasFieldAnnotation(Class<? extends Annotation> annotationType,
VariableElement f)
Checks if the given field has an annotation.
|
boolean |
hasMethodAnnotation(Class<? extends Annotation> a,
ExecutableElement method) |
getErrorHandler, getMethodAnnotation, hasMethodAnnotation, setErrorHandlerpublic static final InlineAnnotationReaderImpl theInstance
public <A extends Annotation> A getClassAnnotation(Class<A> a, TypeElement clazz, Locatable srcPos)
AnnotationReaderpublic <A extends Annotation> A getFieldAnnotation(Class<A> a, VariableElement f, Locatable srcPos)
AnnotationReaderpublic boolean hasFieldAnnotation(Class<? extends Annotation> annotationType, VariableElement f)
AnnotationReaderpublic boolean hasClassAnnotation(TypeElement clazz, Class<? extends Annotation> annotationType)
AnnotationReaderpublic Annotation[] getAllFieldAnnotations(VariableElement field, Locatable srcPos)
AnnotationReaderpublic <A extends Annotation> A getMethodAnnotation(Class<A> a, ExecutableElement method, Locatable srcPos)
public boolean hasMethodAnnotation(Class<? extends Annotation> a, ExecutableElement method)
public Annotation[] getAllMethodAnnotations(ExecutableElement method, Locatable srcPos)
AnnotationReadersrcPos - the location from which this annotation is read.public <A extends Annotation> A getMethodParameterAnnotation(Class<A> a, ExecutableElement m, int paramIndex, Locatable srcPos)
AnnotationReaderpublic <A extends Annotation> A getPackageAnnotation(Class<A> a, TypeElement clazz, Locatable srcPos)
AnnotationReaderpublic TypeMirror getClassValue(Annotation a, String name)
AnnotationReader
Depending on the underlying reflection library, you can't always
obtain the Class object directly (see the Annotation Processing MirrorTypeException
for example), so use this method to avoid that.
name - The name of the annotation parameter to be read.public TypeMirror[] getClassArrayValue(Annotation a, String name)
AnnotationReaderAnnotationReader.getClassValue(Annotation, String) method but
obtains an array parameter.protected String fullName(ExecutableElement m)
AbstractInlineAnnotationReaderImplfullName in class AbstractInlineAnnotationReaderImpl<TypeMirror,TypeElement,VariableElement,ExecutableElement>Copyright © 2019 JBoss by Red Hat. All rights reserved.