public class AnnotationsScanner extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AnnotationsScanner.MethodAnnotations
object that contains all the annotations for some method
|
Constructor and Description |
---|
AnnotationsScanner() |
Modifier and Type | Method and Description |
---|---|
static Method |
doGetAnnotatedMethod(Method method,
Class<? extends Annotation> clazz)
returns the annotated method with annotation clazz and null if the clazz annotation is not present
|
static Map<Method,Set<Annotation>> |
getMethodAnnotations(Class<?> clazz)
Returns the map of method mapped to all the annotation classes on such a method.
|
static List<AnnotationsScanner.MethodAnnotations> |
getMethodAnnotationsList(Class<?> clazz)
Returns the
List of all AnnotationsScanner.MethodAnnotations for class clazz : Thus, all the methods that
have an annotation (possibly on super classes/interfaces). |
public static Map<Method,Set<Annotation>> getMethodAnnotations(Class<?> clazz)
Returns the map of method mapped to all the annotation classes on such a method. Note that also annotations on the public methods of super classes and interfaces are present.
public static List<AnnotationsScanner.MethodAnnotations> getMethodAnnotationsList(Class<?> clazz)
List
of all AnnotationsScanner.MethodAnnotations
for class clazz
: Thus, all the methods that
have an annotation (possibly on super classes/interfaces).clazz
- the clazz to scan its methodsAnnotationsScanner.MethodAnnotations
for clazz
. Empty list when no annotated methods foundpublic static Method doGetAnnotatedMethod(Method method, Class<? extends Annotation> clazz)
method
- the method to scan annotations forclazz
- the annotation to look forMethod
that contains the annotation clazz
and null
if none foundCopyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.