public class DefaultExternalizer extends java.lang.Object implements Externalizer
| Modifier and Type | Field and Description |
|---|---|
protected static byte[] |
BYTES_0 |
protected java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.reflect.Constructor<?>> |
constructors |
protected boolean |
dynamicClass |
protected java.util.concurrent.ConcurrentHashMap<java.lang.Class<?>,java.util.List<Property>> |
orderedFields |
protected java.util.concurrent.ConcurrentHashMap<java.lang.Class<?>,java.util.List<Property>> |
orderedSetterFields |
| Constructor and Description |
|---|
DefaultExternalizer() |
| Modifier and Type | Method and Description |
|---|---|
int |
accept(java.lang.Class<?> clazz) |
void |
configure(XMap properties) |
protected <T> java.lang.reflect.Constructor<T> |
findDefaultConstructor(java.lang.Class<T> clazz) |
java.util.List<Property> |
findOrderedFields(java.lang.Class<?> clazz) |
java.util.List<Property> |
findOrderedFields(java.lang.Class<?> clazz,
boolean returnSettersWhenAvailable) |
protected boolean |
isPropertyIgnored(java.lang.reflect.Field field) |
protected boolean |
isPropertyIgnored(java.lang.reflect.Method method) |
protected boolean |
isValueIgnored(java.lang.Object value) |
java.lang.Object |
newInstance(java.lang.String type,
java.io.ObjectInput in) |
void |
readExternal(java.lang.Object o,
java.io.ObjectInput in) |
void |
writeExternal(java.lang.Object o,
java.io.ObjectOutput out) |
protected static final byte[] BYTES_0
protected final java.util.concurrent.ConcurrentHashMap<java.lang.Class<?>,java.util.List<Property>> orderedFields
protected final java.util.concurrent.ConcurrentHashMap<java.lang.Class<?>,java.util.List<Property>> orderedSetterFields
protected final java.util.concurrent.ConcurrentHashMap<java.lang.String,java.lang.reflect.Constructor<?>> constructors
protected boolean dynamicClass
public void configure(XMap properties)
configure in interface Externalizerpublic java.lang.Object newInstance(java.lang.String type,
java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException,
java.lang.InstantiationException,
java.lang.reflect.InvocationTargetException,
java.lang.IllegalAccessException
newInstance in interface Externalizerjava.io.IOExceptionjava.lang.ClassNotFoundExceptionjava.lang.InstantiationExceptionjava.lang.reflect.InvocationTargetExceptionjava.lang.IllegalAccessExceptionpublic void readExternal(java.lang.Object o,
java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException,
java.lang.IllegalAccessException
readExternal in interface Externalizerjava.io.IOExceptionjava.lang.ClassNotFoundExceptionjava.lang.IllegalAccessExceptionpublic void writeExternal(java.lang.Object o,
java.io.ObjectOutput out)
throws java.io.IOException,
java.lang.IllegalAccessException
writeExternal in interface Externalizerjava.io.IOExceptionjava.lang.IllegalAccessExceptionprotected boolean isValueIgnored(java.lang.Object value)
public java.util.List<Property> findOrderedFields(java.lang.Class<?> clazz)
findOrderedFields in interface Externalizerpublic java.util.List<Property> findOrderedFields(java.lang.Class<?> clazz, boolean returnSettersWhenAvailable)
protected boolean isPropertyIgnored(java.lang.reflect.Field field)
protected boolean isPropertyIgnored(java.lang.reflect.Method method)
protected <T> java.lang.reflect.Constructor<T> findDefaultConstructor(java.lang.Class<T> clazz)
public int accept(java.lang.Class<?> clazz)
accept in interface Externalizer