org.granite.messaging.reflect
Class Reflection
java.lang.Object
org.granite.messaging.reflect.Reflection
public class Reflection
- extends Object
- Author:
- Franck WOLFF
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
STATIC_TRANSIENT_MASK
protected static final int STATIC_TRANSIENT_MASK
- See Also:
- Constant Field Values
STATIC_PRIVATE_PROTECTED_MASK
protected static final int STATIC_PRIVATE_PROTECTED_MASK
- See Also:
- Constant Field Values
NULL_PROPERTY
protected static final Property NULL_PROPERTY
classLoader
protected final ClassLoader classLoader
instanceFactory
protected final BypassConstructorAllocator instanceFactory
lexicalPropertyComparator
protected final Comparator<Property> lexicalPropertyComparator
serializablePropertiesCache
protected final ConcurrentMap<Class<?>,List<Property>> serializablePropertiesCache
singlePropertyCache
protected final ConcurrentMap<Reflection.SinglePropertyKey,Property> singlePropertyCache
Reflection
public Reflection(ClassLoader classLoader)
Reflection
public Reflection(ClassLoader classLoader,
BypassConstructorAllocator instanceFactory)
getClassLoader
public ClassLoader getClassLoader()
loadClass
public Class<?> loadClass(String className)
throws ClassNotFoundException
- Throws:
ClassNotFoundException
newInstance
public <T> T newInstance(Class<T> cls)
throws InstantiationException,
IllegalAccessException,
IllegalArgumentException,
InvocationTargetException,
SecurityException,
NoSuchMethodException
- Throws:
InstantiationException
IllegalAccessException
IllegalArgumentException
InvocationTargetException
SecurityException
NoSuchMethodException
newInstance
public <T> T newInstance(String className)
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException,
IllegalArgumentException,
InvocationTargetException,
SecurityException,
NoSuchMethodException
- Throws:
ClassNotFoundException
InstantiationException
IllegalAccessException
IllegalArgumentException
InvocationTargetException
SecurityException
NoSuchMethodException
findSerializableProperty
public Property findSerializableProperty(Class<?> cls,
String name)
throws SecurityException
- Throws:
SecurityException
findSerializableProperties
public List<Property> findSerializableProperties(Class<?> cls)
throws SecurityException
- Throws:
SecurityException
newFieldProperty
protected FieldProperty newFieldProperty(Field field)
newMethodProperty
protected MethodProperty newMethodProperty(Method getter,
Method setter,
String name)
findSerializableDeclaredProperties
protected List<Property> findSerializableDeclaredProperties(Class<?> cls)
throws SecurityException
- Throws:
SecurityException
isRegularClass
public boolean isRegularClass(Class<?> cls)
findProperty
public Property findProperty(Class<?> cls,
String name,
Class<?> type)
findProperty
public Property findProperty(Class<?> cls,
Class<? extends Annotation> annotationClass)