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