@API(status=EXPERIMENTAL,
since="5.4")
public interface MethodDescriptor
MethodDescriptor
encapsulates functionality for a given Method
.MethodOrdererContext
Modifier and Type | Method and Description |
---|---|
<A extends Annotation> |
findAnnotation(Class<A> annotationType)
Find the first annotation of
annotationType that is either
present or meta-present on the Method for
this descriptor. |
<A extends Annotation> |
findRepeatableAnnotations(Class<A> annotationType)
Find all repeatable annotations of
annotationType that are either present or
meta-present on the Method for this descriptor. |
Method |
getMethod()
Get the method for this descriptor.
|
boolean |
isAnnotated(Class<? extends Annotation> annotationType)
Determine if an annotation of
annotationType is either
present or meta-present on the Method for
this descriptor. |
Method getMethod()
null
boolean isAnnotated(Class<? extends Annotation> annotationType)
annotationType
is either
present or meta-present on the Method
for
this descriptor.annotationType
- the annotation type to search for; never null
true
if the annotation is present or meta-presentfindAnnotation(Class)
,
findRepeatableAnnotations(Class)
<A extends Annotation> Optional<A> findAnnotation(Class<A> annotationType)
annotationType
that is either
present or meta-present on the Method
for
this descriptor.A
- the annotation typeannotationType
- the annotation type to search for; never null
Optional
containing the annotation; never null
but
potentially emptyisAnnotated(Class)
,
findRepeatableAnnotations(Class)
<A extends Annotation> List<A> findRepeatableAnnotations(Class<A> annotationType)
annotationType
that are either present or
meta-present on the Method
for this descriptor.A
- the annotation typeannotationType
- the repeatable annotation type to search for; never
null
null
nor
mutable, but potentially emptyisAnnotated(Class)
,
findAnnotation(Class)
,
Repeatable
Copyright © 2019. All rights reserved.