Class UnbackedAnnotated
- java.lang.Object
-
- org.jboss.weld.annotated.slim.BaseAnnotated
-
- org.jboss.weld.annotated.slim.unbacked.UnbackedAnnotated
-
- All Implemented Interfaces:
Annotated
- Direct Known Subclasses:
UnbackedAnnotatedMember,UnbackedAnnotatedParameter,UnbackedAnnotatedType
public abstract class UnbackedAnnotated extends BaseAnnotated
-
-
Constructor Summary
Constructors Constructor Description UnbackedAnnotated(Type baseType, Set<Type> typeClosure, Set<Annotation> annotations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends Annotation>
TgetAnnotation(Class<T> annotationType)Get program element annotation of a certain annotation type.Set<Annotation>getAnnotations()Get all annotations of the program element.Set<Type>getTypeClosure()Get all types to which the base type should be considered assignable.booleanisAnnotationPresent(Class<? extends Annotation> annotationType)Determine if the program element has an annotation of a certain annotation type.-
Methods inherited from class org.jboss.weld.annotated.slim.BaseAnnotated
getBaseType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.enterprise.inject.spi.Annotated
getAnnotations
-
-
-
-
Constructor Detail
-
UnbackedAnnotated
public UnbackedAnnotated(Type baseType, Set<Type> typeClosure, Set<Annotation> annotations)
-
-
Method Detail
-
getAnnotation
public <T extends Annotation> T getAnnotation(Class<T> annotationType)
Description copied from interface:AnnotatedGet program element annotation of a certain annotation type. The behavior of this method is intended to be the same behavior as
AnnotatedElement.getAnnotation(Class), where repeatable annotations are not supported.- Type Parameters:
T- the type of the annotation- Parameters:
annotationType- the class of the annotation type- Returns:
- the first program element annotation of the given annotation type, or a null value
-
getAnnotations
public Set<Annotation> getAnnotations()
Description copied from interface:AnnotatedGet all annotations of the program element.
- Returns:
- all annotations of the program element, or an empty set if no annotations are present
-
isAnnotationPresent
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
Description copied from interface:AnnotatedDetermine if the program element has an annotation of a certain annotation type. The behavior of this method is similar to
AnnotatedElement.isAnnotationPresent(Class)for the underlying program element.- Parameters:
annotationType- the annotation type to check for- Returns:
- true if the program element has an annotation of the given annotation type, or false otherwise
-
-