Class ValidationEnabledAnnotatedType<T>
- All Implemented Interfaces:
Annotated,AnnotatedType<T>
- Author:
- Hardy Ferentschik
-
Constructor Summary
ConstructorsConstructorDescriptionValidationEnabledAnnotatedType(AnnotatedType<T> type, Set<AnnotatedCallable<? super T>> constrainedCallables) -
Method Summary
Modifier and TypeMethodDescription<A extends Annotation>
AgetAnnotation(Class<A> annotationType) Get program element annotation of a certain annotation type.Get all annotations of the program element.Get the type of the annotated program element.Get the constructors of the type.Set<AnnotatedField<? super T>>Get the fields of the type.Get the underlyingClass.Set<AnnotatedMethod<? super T>>Get the methods of the type.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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.enterprise.inject.spi.AnnotatedType
getAnnotations
-
Constructor Details
-
ValidationEnabledAnnotatedType
public ValidationEnabledAnnotatedType(AnnotatedType<T> type, Set<AnnotatedCallable<? super T>> constrainedCallables)
-
-
Method Details
-
getJavaClass
Description copied from interface:AnnotatedTypeGet the underlying
Class.- Specified by:
getJavaClassin interfaceAnnotatedType<T>- Returns:
- the
Class
-
getConstructors
Description copied from interface:AnnotatedTypeGet the constructors of the type. If an empty set is returned, a default constructor with no parameters will be assumed.
- Specified by:
getConstructorsin interfaceAnnotatedType<T>- Returns:
- the constructors, or an empty set if none are defined
-
getMethods
Description copied from interface:AnnotatedTypeGet the methods of the type.
- Specified by:
getMethodsin interfaceAnnotatedType<T>- Returns:
- the methods, or an empty set if none are defined
-
getFields
Description copied from interface:AnnotatedTypeGet the fields of the type.
- Specified by:
getFieldsin interfaceAnnotatedType<T>- Returns:
- the fields, or an empty set if none are defined
-
getBaseType
Description copied from interface:AnnotatedGet the type of the annotated program element.
- Specified by:
getBaseTypein interfaceAnnotated- Returns:
- the type of the annotated program element
-
getTypeClosure
Description copied from interface:AnnotatedGet all types to which the base type should be considered assignable.
- Specified by:
getTypeClosurein interfaceAnnotated- Returns:
- a set of all types to which the base type should be considered assignable
-
getAnnotation
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.- Specified by:
getAnnotationin interfaceAnnotated- Type Parameters:
A- 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
Description copied from interface:AnnotatedGet all annotations of the program element.
- Specified by:
getAnnotationsin interfaceAnnotated- Returns:
- all annotations of the program element, or an empty set if no annotations are present
-
isAnnotationPresent
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.- Specified by:
isAnnotationPresentin interfaceAnnotated- Parameters:
annotationType- the annotation type to check for- Returns:
trueif the program element has an annotation of the given annotation type, orfalseotherwise
-