public final class ReflectionHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
extractFieldName(Method method) |
static String |
extractFieldName(String methodName) |
static List<String> |
extractParameterNames(Executable methodOrConstructor) |
static Collection<Field> |
findAnnotatedFields(Class<?> type,
Class<? extends Annotation> annotation) |
static Method |
findAnnotatedMethod(Class<?> configClass,
Class<? extends Annotation> annotation,
String methodName,
Class<?>... paramTypes) |
static Collection<Method> |
findAnnotatedMethods(Class<?> type,
Class<? extends Annotation> annotation)
Find methods that are tagged with a given annotation somewhere in the hierarchy
|
static Iterable<Field> |
getAllDeclaredFields(Class<?> type) |
static Iterable<Method> |
getAllDeclaredMethods(Class<?> type) |
static Class<?> |
getArrayOfType(Type componentType) |
static <T extends Annotation> |
getEffectiveClassAnnotations(Class<?> type,
Class<T> annotation) |
static Type |
getFutureReturnType(Type type) |
static Type |
getIterableType(Type type) |
static Type |
getMapKeyType(Type type) |
static Type |
getMapValueType(Type type) |
static Type |
getOptionalType(Type type) |
static boolean |
isArray(Type type) |
static boolean |
isOptional(Type type) |
static Type |
resolveFieldType(Type structType,
Type genericType) |
static Type[] |
resolveFieldTypes(Type structType,
Type[] genericTypes) |
public static boolean isArray(Type type)
public static boolean isOptional(Type type)
public static <T extends Annotation> Set<T> getEffectiveClassAnnotations(Class<?> type, Class<T> annotation)
public static Collection<Method> findAnnotatedMethods(Class<?> type, Class<? extends Annotation> annotation)
public static Method findAnnotatedMethod(Class<?> configClass, Class<? extends Annotation> annotation, String methodName, Class<?>... paramTypes)
public static Collection<Field> findAnnotatedFields(Class<?> type, Class<? extends Annotation> annotation)
public static List<String> extractParameterNames(Executable methodOrConstructor)
Copyright © 2012–2018. All rights reserved.