Package org.apache.xbean.finder
Class MetaAnnotatedElement<T extends AnnotatedElement>
java.lang.Object
org.apache.xbean.finder.MetaAnnotatedElement<T>
- All Implemented Interfaces:
AnnotatedElement
,Annotated<T>
,MetaAnnotated<T>
- Direct Known Subclasses:
MetaAnnotatedClass
,MetaAnnotatedConstructor
,MetaAnnotatedField
,MetaAnnotatedMethod
public class MetaAnnotatedElement<T extends AnnotatedElement>
extends Object
implements AnnotatedElement, MetaAnnotated<T>
- Version:
- $Rev$ $Date$
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<Class<? extends Annotation>,
MetaAnnotation<?>> protected final T
-
Constructor Summary
ConstructorsConstructorDescriptionMetaAnnotatedElement
(T element) MetaAnnotatedElement
(T target, Map<Class<? extends Annotation>, MetaAnnotation<?>> annotations) -
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
contains
(Annotation[] annotations, Class<? extends Annotation> clazz) boolean
get()
<T extends Annotation>
TgetAnnotation
(Class<T> annotationClass) private static Collection<Annotation>
getDeclaredMetaAnnotations
(Class<? extends Annotation> clazz) private static Class<? extends Annotation>
getMetatype
(Class<? extends Annotation> clazz) int
hashCode()
boolean
isAnnotationPresent
(Class<? extends Annotation> annotationClass) private static boolean
isMetaAnnotation
(Class<? extends Annotation> clazz) private static boolean
isMetatypeAnnotation
(Class<? extends Annotation> type) private static boolean
isSelfAnnotated
(Class<? extends Annotation> type, String name) toString()
protected static Map<Class<? extends Annotation>,
MetaAnnotation<?>> unroll
(Annotation[] annotations) private static void
unroll
(Class<? extends Annotation> clazz, int depth, Map<Class<? extends Annotation>, MetaAnnotation<?>> found) protected static Map<Class<? extends Annotation>,
MetaAnnotation<?>> unroll
(AnnotatedElement element) protected Annotation[][]
unrollParameters
(Annotation[][] parameterAnnotations) private static boolean
validTarget
(Class<? extends Annotation> type) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.reflect.AnnotatedElement
getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByType
-
Field Details
-
annotations
-
target
-
-
Constructor Details
-
MetaAnnotatedElement
-
MetaAnnotatedElement
MetaAnnotatedElement(T target, Map<Class<? extends Annotation>, MetaAnnotation<?>> annotations)
-
-
Method Details
-
get
- Specified by:
get
in interfaceAnnotated<T extends AnnotatedElement>
-
getDeclaredAnnotations
- Specified by:
getDeclaredAnnotations
in interfaceAnnotatedElement
-
isAnnotationPresent
- Specified by:
isAnnotationPresent
in interfaceAnnotatedElement
-
getAnnotation
- Specified by:
getAnnotation
in interfaceAnnotatedElement
-
getAnnotations
- Specified by:
getAnnotations
in interfaceAnnotatedElement
-
getMetaAnnotations
- Specified by:
getMetaAnnotations
in interfaceMetaAnnotated<T extends AnnotatedElement>
-
equals
-
hashCode
public int hashCode() -
toString
-
unroll
private static void unroll(Class<? extends Annotation> clazz, int depth, Map<Class<? extends Annotation>, MetaAnnotation<?>> found) -
getDeclaredMetaAnnotations
-
contains
-
getMetatype
-
isMetaAnnotation
-
isMetatypeAnnotation
-
isSelfAnnotated
-
validTarget
-
unroll
protected static Map<Class<? extends Annotation>,MetaAnnotation<?>> unroll(AnnotatedElement element) -
unroll
protected static Map<Class<? extends Annotation>,MetaAnnotation<?>> unroll(Annotation[] annotations) -
unrollParameters
-