Package javax.enterprise.inject.spi
Interface Annotated
-
- All Known Subinterfaces:
AnnotatedCallable<X>
,AnnotatedConstructor<X>
,AnnotatedField<X>
,AnnotatedMember<X>
,AnnotatedMethod<X>
,AnnotatedParameter<X>
,AnnotatedType<X>
public interface Annotated
Describes annotated member properties.- Version:
- $Rev: 1427581 $ $Date: 2013-01-01 23:38:17 +0100 (Tue, 01 Jan 2013) $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T extends java.lang.annotation.Annotation>
TgetAnnotation(java.lang.Class<T> annotationType)
Gets annotated element's annotation member if exist, null otherwisejava.util.Set<java.lang.annotation.Annotation>
getAnnotations()
Gets annotated member all annotations.java.lang.reflect.Type
getBaseType()
Returns type of the element.java.util.Set<java.lang.reflect.Type>
getTypeClosure()
Returns set of type closures.boolean
isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Returns true if annotated member has annotation for given annotation type, false otherwise.
-
-
-
Method Detail
-
getBaseType
java.lang.reflect.Type getBaseType()
Returns type of the element.- Returns:
- type of the element
-
getTypeClosure
java.util.Set<java.lang.reflect.Type> getTypeClosure()
Returns set of type closures. Type closure means thatgetBaseType()
is assignable.- Returns:
- set of type closures.
-
getAnnotation
<T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationType)
Gets annotated element's annotation member if exist, null otherwise- Type Parameters:
T
- generic annotatation class type- Parameters:
annotationType
- class of the annotation- Returns:
- annotated element's annotation member if exist, null otherwise
-
getAnnotations
java.util.Set<java.lang.annotation.Annotation> getAnnotations()
Gets annotated member all annotations.- Returns:
- annotated member annotations
-
isAnnotationPresent
boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Returns true if annotated member has annotation for given annotation type, false otherwise.- Parameters:
annotationType
- type of the annotation- Returns:
- true if annotated member has annotation for given annotation type
-
-