public class ValidationEnabledAnnotatedType<T> extends Object implements AnnotatedType<T>
Constructor and Description |
---|
ValidationEnabledAnnotatedType(AnnotatedType<T> type,
Set<AnnotatedCallable<? super T>> constrainedCallables) |
Modifier and Type | Method and Description |
---|---|
<A extends Annotation> |
getAnnotation(Class<A> annotationType)
Get program element annotation of a certain annotation type.
|
Set<Annotation> |
getAnnotations()
Get all annotations of the program element.
|
Type |
getBaseType()
Get the type of the annotated program element.
|
Set<AnnotatedConstructor<T>> |
getConstructors()
Get the constructors of the type.
|
Set<AnnotatedField<? super T>> |
getFields()
Get the fields of the type.
|
Class<T> |
getJavaClass()
Get the underlying
Class . |
Set<AnnotatedMethod<? super T>> |
getMethods()
Get the methods of the type.
|
Set<Type> |
getTypeClosure()
Get all types to which the base type should be considered assignable.
|
boolean |
isAnnotationPresent(Class<? extends Annotation> annotationType)
Determine if the program element has an annotation of a certain annotation type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAnnotations
public ValidationEnabledAnnotatedType(AnnotatedType<T> type, Set<AnnotatedCallable<? super T>> constrainedCallables)
public Class<T> getJavaClass()
AnnotatedType
Get the underlying Class
.
getJavaClass
in interface AnnotatedType<T>
Class
public Set<AnnotatedConstructor<T>> getConstructors()
AnnotatedType
Get the constructors of the type. If an empty set is returned, a default constructor with no parameters will be assumed.
getConstructors
in interface AnnotatedType<T>
public Set<AnnotatedMethod<? super T>> getMethods()
AnnotatedType
Get the methods of the type.
getMethods
in interface AnnotatedType<T>
public Set<AnnotatedField<? super T>> getFields()
AnnotatedType
Get the fields of the type.
getFields
in interface AnnotatedType<T>
public Type getBaseType()
Annotated
Get the type of the annotated program element.
getBaseType
in interface Annotated
public Set<Type> getTypeClosure()
Annotated
Get all types to which the base type should be considered assignable.
getTypeClosure
in interface Annotated
public <A extends Annotation> A getAnnotation(Class<A> annotationType)
Annotated
Get 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.
getAnnotation
in interface Annotated
A
- the type of the annotationannotationType
- the class of the annotation typepublic Set<Annotation> getAnnotations()
Annotated
Get all annotations of the program element.
getAnnotations
in interface Annotated
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
Annotated
Determine 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.
isAnnotationPresent
in interface Annotated
annotationType
- the annotation type to check forCopyright © 2021 JBoss by Red Hat. All rights reserved.