Package com.intellij.util
Class ReflectionUtil
- java.lang.Object
-
- com.intellij.util.ReflectionUtil
-
public class ReflectionUtil extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ArrayList<Field>
collectFields(Class clazz)
static String
declarationToString(GenericDeclaration anInterface)
static Field
findAssignableField(Class clazz, Class type, String name)
static Field
findField(Class clazz, Class type, String name)
static Method
findMethod(Method[] methods, String name, Class... parameters)
static Type[]
getActualTypeArguments(ParameterizedType parameterizedType)
static Method
getDeclaredMethod(Class aClass, String name, Class... parameters)
static Object
getField(Class objectClass, Object object, Class type, String name)
static Method
getMethod(Class aClass, String name, Class... parameters)
static Class<?>
getRawType(Type type)
static void
resetField(Class clazz, Class type, String name)
static void
resetField(Object object, Class type, String name)
static void
resetField(Object object, Field field)
static void
resetField(Object object, String name)
static Type
resolveVariable(TypeVariable variable, Class classType)
static Type
resolveVariable(TypeVariable variable, Class classType, boolean resolveInInterfacesOnly)
static Type
resolveVariableInHierarchy(TypeVariable variable, Class aClass)
static Class<?>
substituteGenericType(Type genericType, Type classType)
-
-
-
Method Detail
-
resolveVariable
@Nullable public static Type resolveVariable(TypeVariable variable, Class classType)
-
resolveVariable
@Nullable public static Type resolveVariable(TypeVariable variable, Class classType, boolean resolveInInterfacesOnly)
-
declarationToString
public static String declarationToString(GenericDeclaration anInterface)
-
getActualTypeArguments
public static Type[] getActualTypeArguments(ParameterizedType parameterizedType)
-
substituteGenericType
@Nullable public static Class<?> substituteGenericType(Type genericType, Type classType)
-
findField
public static Field findField(Class clazz, @Nullable Class type, String name) throws NoSuchFieldException
- Throws:
NoSuchFieldException
-
findAssignableField
public static Field findAssignableField(Class clazz, Class type, String name) throws NoSuchFieldException
- Throws:
NoSuchFieldException
-
findMethod
@Nullable public static Method findMethod(Method[] methods, @NonNls @NotNull String name, Class... parameters)
-
getMethod
@Nullable public static Method getMethod(@NotNull Class aClass, @NonNls @NotNull String name, Class... parameters)
-
getDeclaredMethod
@Nullable public static Method getDeclaredMethod(@NotNull Class aClass, @NonNls @NotNull String name, Class... parameters)
-
getField
public static Object getField(Class objectClass, Object object, Class type, @NonNls String name)
-
resolveVariableInHierarchy
public static Type resolveVariableInHierarchy(TypeVariable variable, Class aClass)
-
-