public class MethodAnnotationReflection
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <T extends java.lang.annotation.Annotation> |
findMethodWithAnnotation(java.lang.reflect.Method provided,
java.lang.Class<T> annotationCls)
Looks through the method's declaring class's hierarchy to find a method with a compatible which is annotated with the provided
annotation.
|
public static <T extends java.lang.annotation.Annotation> java.util.Optional<java.lang.reflect.Method> findMethodWithAnnotation(java.lang.reflect.Method provided,
java.lang.Class<T> annotationCls)
T - The type of the Annotation to be searched for.provided - The method to look for the most recent implementation of using this annotationannotationCls - The annotation the method must contain.