Package net.jqwik.engine.support
Class OverriddenMethodAnnotationSupport
- java.lang.Object
-
- net.jqwik.engine.support.OverriddenMethodAnnotationSupport
-
public final class OverriddenMethodAnnotationSupport extends java.lang.ObjectAdapted from https://stackoverflow.com/a/49164791/32352
-
-
Constructor Summary
Constructors Constructor Description OverriddenMethodAnnotationSupport()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <A extends java.lang.annotation.Annotation>
java.util.Optional<A>findDeclaredOrInheritedAnnotation(java.lang.reflect.Method m, java.lang.Class<A> t)Returns the optional first element of the list returned bygetAnnotations, ornullif the list would be empty.
-
-
-
Method Detail
-
findDeclaredOrInheritedAnnotation
public static <A extends java.lang.annotation.Annotation> java.util.Optional<A> findDeclaredOrInheritedAnnotation(java.lang.reflect.Method m, java.lang.Class<A> t)Returns the optional first element of the list returned bygetAnnotations, ornullif the list would be empty.- Type Parameters:
A- the type of the annotation to find.- Parameters:
m- the method to begin the search from.t- the type of the annotation to find.- Returns:
- optional of first annotation found of the specified type which
is present on
m, or present on any methods whichmoverrides. - Throws:
java.lang.NullPointerException- if any argument isnull.
-
-