public class AnnotationMethodResolver extends java.lang.Object implements MethodResolver
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)
public java.lang.reflect.Method findMethod(java.lang.Object candidate)
findMethod
in interface MethodResolver
candidate
- 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 annotationpublic java.lang.reflect.Method findMethod(java.lang.Class<?> clazz)
findMethod
in interface MethodResolver
clazz
- 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