public class Reflection extends Object
| Modifier and Type | Field and Description |
|---|---|
protected ClassLoader |
classLoader |
protected ConstructorFactory |
constructorFactory |
protected Comparator<Field> |
lexicalFieldComparator |
protected ConcurrentMap<Class<?>,List<Field>> |
serializableFieldsCache |
protected static int |
STATIC_TRANSIENT_MASK |
| Constructor and Description |
|---|
Reflection(ClassLoader classLoader) |
| Modifier and Type | Method and Description |
|---|---|
<T> Constructor<T> |
findDefaultContructor(Class<T> cls) |
protected List<Field> |
findSerializableDeclaredFields(Class<?> cls) |
List<Field> |
findSerializableFields(Class<?> cls) |
ClassLoader |
getClassLoader() |
boolean |
isRegularClass(Class<?> cls) |
Class<?> |
loadClass(String className) |
<T> T |
newInstance(Class<T> cls) |
<T> T |
newInstance(String className) |
protected static final int STATIC_TRANSIENT_MASK
protected final ClassLoader classLoader
protected final ConstructorFactory constructorFactory
protected final Comparator<Field> lexicalFieldComparator
protected final ConcurrentMap<Class<?>,List<Field>> serializableFieldsCache
public Reflection(ClassLoader classLoader)
public ClassLoader getClassLoader()
public Class<?> loadClass(String className) throws ClassNotFoundException
ClassNotFoundExceptionpublic <T> T newInstance(Class<T> cls) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, SecurityException, NoSuchMethodException
public <T> T newInstance(String className) throws ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, SecurityException, NoSuchMethodException
public <T> Constructor<T> findDefaultContructor(Class<T> cls) throws SecurityException, NoSuchMethodException
public List<Field> findSerializableFields(Class<?> cls) throws SecurityException
SecurityExceptionprotected List<Field> findSerializableDeclaredFields(Class<?> cls) throws SecurityException
SecurityExceptionpublic boolean isRegularClass(Class<?> cls)