public final class UtilAnnotations extends Object
| Modifier and Type | Method and Description |
|---|---|
static List<Method> |
getAllDeclaredMethods(Class<?> type)
Get all declared methods, from superclass to subclass in that order.
|
static <T extends Annotation> |
getAnnotatedMethods(Class<?> type,
Class<T> annotation)
Get annotations of a given type.
|
static <T extends Annotation> |
getAnnotatedMethods(Object instance,
Class<T> annotation)
Get annotations of a given object.
|
static <T extends Annotation> |
getAnnotations(Class<?> type,
Class<T> annotationType,
boolean inherited)
Get full list annotation values of a given type.
|
static List<Method> |
getMethods(Class<?> type)
Get public methods of a type.
|
public static <T extends Annotation> List<T> getAnnotations(Class<?> type, Class<T> annotationType, boolean inherited)
type - Object type.annotationType - A annotation type..inherited - If super type should be scanned also.public static <T extends Annotation> List<Method> getAnnotatedMethods(Object instance, Class<T> annotation)
T - Annotation type.instance - An object instance.annotation - The annotation type.public static <T extends Annotation> List<Method> getAnnotatedMethods(Class<?> type, Class<T> annotation)
T - Annotation type.type - A class type.annotation - The annotation type.public static List<Method> getMethods(Class<?> type)
type - A type.Copyright © 2016. All rights reserved.