public class AnnotationMethodFilter extends Object implements org.springframework.util.ReflectionUtils.MethodFilter
ReflectionUtils.doWithMethods(Class, ReflectionUtils.MethodCallback, ReflectionUtils.MethodFilter)
that
return only method that contains at least one Annotation
s from defined list getAnnotationTypes()
.ReflectionUtils.MethodFilter
,
ReflectionUtils.doWithMethods(Class, ReflectionUtils.MethodCallback, ReflectionUtils.MethodFilter)
,
AnnotationUtils
Constructor and Description |
---|
AnnotationMethodFilter(Class<? extends Annotation>... annotationTypes)
New instance.
|
AnnotationMethodFilter(Class<? extends Annotation> annotationType)
New instance.
|
AnnotationMethodFilter(Collection<Class<? extends Annotation>> annotationTypes)
New instance.
|
Modifier and Type | Method and Description |
---|---|
List<Class<? extends Annotation>> |
getAnnotationTypes()
Gets all
Annotation s. |
boolean |
matches(Method method) |
public AnnotationMethodFilter(Class<? extends Annotation> annotationType)
annotationType
- Annotation
which method must havepublic AnnotationMethodFilter(Class<? extends Annotation>... annotationTypes)
annotationTypes
- Annotation
s which method must have least onepublic AnnotationMethodFilter(Collection<Class<? extends Annotation>> annotationTypes)
annotationTypes
- Annotation
s which method must have least onepublic boolean matches(Method method)
matches
in interface org.springframework.util.ReflectionUtils.MethodFilter
public List<Class<? extends Annotation>> getAnnotationTypes()
Annotation
s.Annotation
sCopyright © 2018 Pivotal Software, Inc.. All rights reserved.