public abstract class ClassReflectionUtil extends Object
| Constructor and Description |
|---|
ClassReflectionUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Set<Class<?>> |
getClassHierarchies(Class<?>[] classes) |
static Set<Class<?>> |
getClassHierarchies(Collection<? extends Class<?>> classes) |
static Set<Class<?>> |
getClassHierarchy(Class<?> klass) |
static Object |
getDeclaredFieldValue(Object target,
String field)
Get the value of a field on the given object.
|
static Set<Class<?>> |
getInterfaces(Collection<Class<?>> classes) |
static void |
setDeclaredFieldValue(Object instance,
String field,
Object value)
Set the value of a field on the given instance.
|
public static Set<Class<?>> getClassHierarchy(Class<?> klass)
klass - a root class.public static Set<Class<?>> getClassHierarchies(Class<?>[] classes)
classes - root classes.public static Set<Class<?>> getClassHierarchies(Collection<? extends Class<?>> classes)
classes - root classes.public static Set<Class<?>> getInterfaces(Collection<Class<?>> classes)
classes - a set of classes.public static void setDeclaredFieldValue(Object instance, String field, Object value) throws NoSuchFieldException, IllegalAccessException
public static Object getDeclaredFieldValue(Object target, String field) throws NoSuchFieldException, IllegalAccessException
Copyright © 2016. All rights reserved.