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