@API(status=STABLE,
since="5.10")
public interface ClassDescriptor
ClassDescriptor encapsulates functionality for a given Class.ClassOrdererContext| Modifier and Type | Method and Description |
|---|---|
<A extends java.lang.annotation.Annotation> |
findAnnotation(java.lang.Class<A> annotationType)
Find the first annotation of
annotationType that is either
present or meta-present on the Class for
this descriptor. |
<A extends java.lang.annotation.Annotation> |
findRepeatableAnnotations(java.lang.Class<A> annotationType)
Find all repeatable annotations of
annotationType that are either present or
meta-present on the Class for this descriptor. |
java.lang.String |
getDisplayName()
Get the display name for this descriptor's
class. |
java.lang.Class<?> |
getTestClass()
Get the class for this descriptor.
|
boolean |
isAnnotated(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Determine if an annotation of
annotationType is either
present or meta-present on the Class for
this descriptor. |
java.lang.Class<?> getTestClass()
nulljava.lang.String getDisplayName()
class.null
or blankboolean isAnnotated(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
annotationType is either
present or meta-present on the Class for
this descriptor.annotationType - the annotation type to search for; never nulltrue if the annotation is present or meta-presentfindAnnotation(Class),
findRepeatableAnnotations(Class)<A extends java.lang.annotation.Annotation> java.util.Optional<A> findAnnotation(java.lang.Class<A> annotationType)
annotationType that is either
present or meta-present on the Class for
this descriptor.A - the annotation typeannotationType - the annotation type to search for; never nullOptional containing the annotation; never null but
potentially emptyisAnnotated(Class),
findRepeatableAnnotations(Class)<A extends java.lang.annotation.Annotation> java.util.List<A> findRepeatableAnnotations(java.lang.Class<A> annotationType)
annotationType that are either present or
meta-present on the Class for this descriptor.A - the annotation typeannotationType - the repeatable annotation type to search for; never
nullnull nor
mutable, but potentially emptyisAnnotated(Class),
findAnnotation(Class),
Repeatable