ClassDescriptor
encapsulates functionality for a given
Class
.
- Since:
- 5.8
- See Also:
-
-
Method Summary
Find the first annotation of
annotationType
that is either
present or
meta-present on the
Class
for
this descriptor.
Find all
repeatable annotations of
annotationType
that are either
present or
meta-present on the
Class
for this descriptor.
Get the display name for this descriptor's
class
.
Get the class for this descriptor.
boolean
Determine if an annotation of
annotationType
is either
present or
meta-present on the
Class
for
this descriptor.
-
Method Details
-
getTestClass
Get the class for this descriptor.
- Returns:
- the class; never
null
-
getDisplayName
Get the display name for this descriptor's
class
.
- Returns:
- the display name for this descriptor's class; never
null
or blank
-
isAnnotated
Determine if an annotation of
annotationType
is either
present or
meta-present on the
Class
for
this descriptor.
- Parameters:
annotationType
- the annotation type to search for; never null
- Returns:
true
if the annotation is present or meta-present
- See Also:
-
-
findAnnotation
Find the first annotation of
annotationType
that is either
present or
meta-present on the
Class
for
this descriptor.
- Type Parameters:
A
- the annotation type
- Parameters:
annotationType
- the annotation type to search for; never null
- Returns:
- an
Optional
containing the annotation; never null
but
potentially empty
- See Also:
-
-
findRepeatableAnnotations
Find all
repeatable annotations of
annotationType
that are either
present or
meta-present on the
Class
for this descriptor.
- Type Parameters:
A
- the annotation type
- Parameters:
annotationType
- the repeatable annotation type to search for; never
null
- Returns:
- the list of all such annotations found; neither
null
nor
mutable, but potentially empty
- See Also:
-