class DefaultMethodDescriptor extends java.lang.Object implements MethodDescriptor
MethodDescriptor, backed by
a MethodBasedTestDescriptor.| Modifier and Type | Field and Description |
|---|---|
private MethodBasedTestDescriptor |
testDescriptor |
| Constructor and Description |
|---|
DefaultMethodDescriptor(MethodBasedTestDescriptor testDescriptor) |
| 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 Method 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 Method for this descriptor. |
java.lang.reflect.Method |
getMethod()
Get the method for this descriptor.
|
(package private) MethodBasedTestDescriptor |
getTestDescriptor() |
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 Method for
this descriptor. |
java.lang.String |
toString() |
private final MethodBasedTestDescriptor testDescriptor
DefaultMethodDescriptor(MethodBasedTestDescriptor testDescriptor)
MethodBasedTestDescriptor getTestDescriptor()
public final java.lang.reflect.Method getMethod()
MethodDescriptorgetMethod in interface MethodDescriptornullpublic boolean isAnnotated(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
MethodDescriptorannotationType is either
present or meta-present on the Method for
this descriptor.isAnnotated in interface MethodDescriptorannotationType - the annotation type to search for; never nulltrue if the annotation is present or meta-presentMethodDescriptor.findAnnotation(Class),
MethodDescriptor.findRepeatableAnnotations(Class)public <A extends java.lang.annotation.Annotation> java.util.Optional<A> findAnnotation(java.lang.Class<A> annotationType)
MethodDescriptorannotationType that is either
present or meta-present on the Method for
this descriptor.findAnnotation in interface MethodDescriptorA - the annotation typeannotationType - the annotation type to search for; never nullOptional containing the annotation; never null but
potentially emptyMethodDescriptor.isAnnotated(Class),
MethodDescriptor.findRepeatableAnnotations(Class)public <A extends java.lang.annotation.Annotation> java.util.List<A> findRepeatableAnnotations(java.lang.Class<A> annotationType)
MethodDescriptorannotationType that are either present or
meta-present on the Method for this descriptor.findRepeatableAnnotations in interface MethodDescriptorA - the annotation typeannotationType - the repeatable annotation type to search for; never
nullnull nor
mutable, but potentially emptyMethodDescriptor.isAnnotated(Class),
MethodDescriptor.findAnnotation(Class),
Repeatablepublic java.lang.String toString()
toString in class java.lang.Object