Can newInstance: classes with public visibility, outer classes, static inner classes, classes with default constructors and any class that implements java.io.Serializable.
Cannot newInstance: classes without public visibility, non-static inner classes, classes without default constructors. Note that any code in the constructor of a class will be executed when the ObjectFactory instantiates the object.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| protected FieldDictionary | |
| private transient Map | |
| private transient Map |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | fieldDefinedInClass(String fieldName, Class<T> type)
Implements com.
Deprecated
As of 1.4.5, use
getFieldOrNull(Class, String) instead
|
| protected boolean | |
| public Field | getField(Class<T>
class where the field was defined definedIn, String field name fieldName)Implements com. |
| public Field | getFieldOrNull(Class<T>
class where the field was defined definedIn, String field name fieldName)Implements com. |
| public Class | getFieldType(Object object, String fieldName, Class<T> definedIn)
Implements com. |
| protected void | |
| private Object | |
| public Object | newInstance(Class<T>
the type to instantiate type)Implements com. |
| private Object | |
| public void | |
| protected void | |
| public void | |
| public void | writeField(Object object, String fieldName, Object value, Class<T> definedIn)
Implements com. |
| fieldDictionary | back to summary |
|---|---|
| protected FieldDictionary fieldDictionary | |
| objectStreamClassCache | back to summary |
|---|---|
| private transient Map<K, V> objectStreamClassCache | |
| serializedDataCache | back to summary |
|---|---|
| private transient Map<K, V> serializedDataCache | |
| PureJavaReflectionProvider | back to summary |
|---|---|
| public PureJavaReflectionProvider() | |
| PureJavaReflectionProvider | back to summary |
|---|---|
| public PureJavaReflectionProvider(FieldDictionary fieldDictionary) | |
| fieldDefinedInClass | back to summary |
|---|---|
| public boolean fieldDefinedInClass(String fieldName, Class<T> type) Implements com. Deprecated As of 1.4.5, use | |
| fieldModifiersSupported | back to summary |
|---|---|
| protected boolean fieldModifiersSupported(Field field) | |
| getField | back to summary |
|---|---|
| public Field getField(Class<T> definedIn, String fieldName) Implements com. Doc from com. Returns a field defined in some class. | |
| getFieldOrNull | back to summary |
|---|---|
| public Field getFieldOrNull(Class<T> definedIn, String fieldName) Implements com. Doc from com. Returns a field defined in some class. | |
| getFieldType | back to summary |
|---|---|
| public Class Implements com. | |
| init | back to summary |
|---|---|
| protected void init() | |
| instantiateUsingSerialization | back to summary |
|---|---|
| private Object instantiateUsingSerialization(final Class<T> type) | |
| newInstance | back to summary |
|---|---|
| public Object newInstance(Class<T> type) Implements com. Doc from com. Creates a new instance of the specified type. It is in the responsibility of the implementation how such an instance is created. | |
| readResolve | back to summary |
|---|---|
| private Object readResolve() | |
| setFieldDictionary | back to summary |
|---|---|
| public void setFieldDictionary(FieldDictionary dictionary) | |
| validateFieldAccess | back to summary |
|---|---|
| protected void validateFieldAccess(Field field) | |
| visitSerializableFields | back to summary |
|---|---|
| public void visitSerializableFields(Object object, ReflectionProvider. Implements com. | |
| writeField | back to summary |
|---|---|
| public void writeField(Object object, String fieldName, Object value, Class<T> definedIn) Implements com. | |
| Modifier and Type | Field and Description |
|---|---|
| private static final Method |
| Access | Constructor and Description |
|---|---|
| private |
| newInstance | back to summary |
|---|---|
| private static final Method newInstance | |
| Reflections | back to summary |
|---|---|
| private Reflections() | |