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