public class AnnotationMethodResolver extends java.lang.Object implements MethodResolver
MethodResolver implementation that finds a single Method on the
given Class that contains the specified annotation type.| Constructor and Description |
|---|
AnnotationMethodResolver(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Create a
MethodResolver for the specified Method-level annotation type. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.reflect.Method |
findMethod(java.lang.Class<?> clazz)
Find a single Method on the given Class that contains the
annotation type for which this resolver is searching.
|
java.lang.reflect.Method |
findMethod(java.lang.Object candidate)
Find a single Method on the Class of the given candidate object
that contains the annotation type for which this resolver is searching.
|
public AnnotationMethodResolver(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
MethodResolver for the specified Method-level annotation type.annotationType - establish the annotation to be used.@Nullable public java.lang.reflect.Method findMethod(java.lang.Object candidate)
findMethod in interface MethodResolvercandidate - the instance whose Class will be checked for the
annotationnull if the
candidate's Class contains no Methods with the specified annotationjava.lang.IllegalArgumentException - if more than one Method has the
specified annotation@Nullable public java.lang.reflect.Method findMethod(java.lang.Class<?> clazz)
findMethod in interface MethodResolverclazz - the Class instance to check for the annotationnull if the
Class contains no Methods with the specified annotationjava.lang.IllegalArgumentException - if more than one Method has the
specified annotation