T - S - public abstract class AbstractEnhancedAnnotated<T,S> extends Object implements EnhancedAnnotated<T,S>
EnhancedAnnotatedMAPPED_DECLARED_METAANNOTATIONS, MAPPED_METAANNOTATIONS| Constructor and Description |
|---|
AbstractEnhancedAnnotated(Annotated annotated,
Map<Class<? extends Annotation>,Annotation> annotationMap,
Map<Class<? extends Annotation>,Annotation> declaredAnnotationMap,
ClassTransformer classTransformer)
Constructor
Also builds the meta-annotation map.
|
| Modifier and Type | Method and Description |
|---|---|
protected static void |
addMetaAnnotations(ArraySetMultimap<Class<? extends Annotation>,Annotation> metaAnnotationMap,
Annotation annotation,
Annotation[] metaAnnotations,
boolean declared) |
protected static void |
addMetaAnnotations(ArraySetMultimap<Class<? extends Annotation>,Annotation> metaAnnotationMap,
Annotation annotation,
Iterable<Annotation> metaAnnotations,
boolean declared) |
protected static Map<Class<? extends Annotation>,Annotation> |
buildAnnotationMap(Annotation[] annotations)
Builds the annotation map (annotation type -> annotation)
|
protected static Map<Class<? extends Annotation>,Annotation> |
buildAnnotationMap(Iterable<Annotation> annotations)
Builds the annotation map (annotation type -> annotation)
|
Type[] |
getActualTypeArguments()
Gets the actual type arguments for any parameterized types that this
AnnotatedItem represents.
|
<A extends Annotation> |
getAnnotation(Class<A> annotationType)
Get program element annotation of a certain annotation type.
|
Set<Annotation> |
getAnnotations()
Get all annotations of the program element.
|
Type |
getBaseType()
Get the type of the annotated program element.
|
Annotation[] |
getBindingsAsArray()
Deprecated.
|
abstract S |
getDelegate() |
Set<Type> |
getInterfaceClosure()
Get the type hierarchy of any interfaces implemented by this class.
|
Class<T> |
getJavaClass()
Gets the type of the element
|
Set<Annotation> |
getMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
Gets all annotations which are annotated with the given meta annotation
type
|
Set<Annotation> |
getQualifiers()
Deprecated.
|
Set<Type> |
getTypeClosure()
Get all types to which the base type should be considered assignable.
|
boolean |
isAnnotationPresent(Class<? extends Annotation> annotationType)
Determine if the program element has an annotation of a certain annotation type.
|
boolean |
isParameterizedType() |
boolean |
isPrimitive() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetName, getPackage, isFinal, isGeneric, isPackagePrivate, isPrivate, isPublic, isStatic, slimpublic AbstractEnhancedAnnotated(Annotated annotated, Map<Class<? extends Annotation>,Annotation> annotationMap, Map<Class<? extends Annotation>,Annotation> declaredAnnotationMap, ClassTransformer classTransformer)
annotationMap - A map of annotation to registerprotected static Map<Class<? extends Annotation>,Annotation> buildAnnotationMap(Annotation[] annotations)
annotations - The array of annotations to mapprotected static Map<Class<? extends Annotation>,Annotation> buildAnnotationMap(Iterable<Annotation> annotations)
annotations - The array of annotations to mapprotected static void addMetaAnnotations(ArraySetMultimap<Class<? extends Annotation>,Annotation> metaAnnotationMap, Annotation annotation, Annotation[] metaAnnotations, boolean declared)
protected static void addMetaAnnotations(ArraySetMultimap<Class<? extends Annotation>,Annotation> metaAnnotationMap, Annotation annotation, Iterable<Annotation> metaAnnotations, boolean declared)
public Class<T> getJavaClass()
EnhancedAnnotatedgetJavaClass in interface EnhancedAnnotated<T,S>public Type[] getActualTypeArguments()
EnhancedAnnotatedgetActualTypeArguments in interface EnhancedAnnotated<T,S>public Set<Type> getInterfaceClosure()
EnhancedAnnotatedgetInterfaceClosure in interface EnhancedAnnotated<T,S>public abstract S getDelegate()
public boolean isParameterizedType()
isParameterizedType in interface EnhancedAnnotated<T,S>public boolean isPrimitive()
isPrimitive in interface EnhancedAnnotated<T,S>public Type getBaseType()
AnnotatedGet the type of the annotated program element.
getBaseType in interface Annotatedpublic Set<Type> getTypeClosure()
AnnotatedGet all types to which the base type should be considered assignable.
getTypeClosure in interface Annotatedpublic Set<Annotation> getAnnotations()
AnnotatedGet all annotations of the program element.
getAnnotations in interface Annotatedpublic Set<Annotation> getMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
EnhancedAnnotatedgetMetaAnnotations in interface EnhancedAnnotated<T,S>@Deprecated public Set<Annotation> getQualifiers()
EnhancedAnnotatedgetQualifiers in interface EnhancedAnnotated<T,S>@Deprecated public Annotation[] getBindingsAsArray()
EnhancedAnnotatedgetBindingsAsArray in interface EnhancedAnnotated<T,S>public <A extends Annotation> A getAnnotation(Class<A> annotationType)
AnnotatedGet program element annotation of a certain annotation type.
getAnnotation in interface AnnotatedA - the type of the annotationannotationType - the class of the annotation typepublic boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
AnnotatedDetermine if the program element has an annotation of a certain annotation type.
isAnnotationPresent in interface AnnotatedannotationType - the annotation type to check forCopyright © 2016. All Rights Reserved.