Class AbstractInternalDeserializer
java.lang.Object
com.pnfsoftware.jeb.util.serialization.AbstractInternalDeserializer
Base class for deserializers. Client code should not extend.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected List<ClassLoader>
protected static Map<Class<?>,
com.pnfsoftware.jeb.util.serialization.AbstractInternalDeserializer.CustomMethods> protected ITypeIdProvider
protected List<com.pnfsoftware.jeb.util.serialization.IPreObject>
protected int
protected LEDataInputStream
protected Object
protected ITypeIdProvider
protected MultiMap<Class<?>,
IDeserializationEventHandler> protected org.objenesis.ObjenesisStd
protected List<IProgressCallback>
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractInternalDeserializer
(ITypeIdProvider customTypeIdProvider, List<ClassLoader> classloaders, LEDataInputStream in) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addObjectCreatedHook
(Class<?> c, IDeserializationEventHandler handler) void
addProgressCallback
(IProgressCallback callback) void
close()
protected com.pnfsoftware.jeb.util.serialization.AbstractInternalDeserializer.CustomMethods
getCustomMethods
(Object o, Class<?> targetClass) int
protected Class<?>
protected void
protected void
notifyDeserializationEvent
(int type, Class<?> c, Object o) protected void
read()
protected abstract Object
readInternal
(Object object, Class<?> c) protected void
registerObject
(boolean isLeafObject, int objectId, Object o) void
removeObjectCreatedHook
(Class<?> c, IDeserializationEventHandler handler) void
removeProgressCallback
(IProgressCallback callback) protected void
void
restoreFields
(Object o, Class<?> targetClass) protected void
restoreFieldValue
(Object o, Class<?> targetClass, int fieldId, Object fieldObject) void
setExpectedObjectCount
(int count)
-
Field Details
-
in
-
nativeTypeIdProvider
-
customTypeIdProvider
-
classloaders
-
objenesis
protected org.objenesis.ObjenesisStd objenesis -
cancelled
protected boolean cancelled -
constructorMap
-
mootObject
-
objmap
-
objIdPostgraphDone
-
deferredObjects
-
customMethods
-
expectedObjectCount
protected int expectedObjectCount -
progressCallbacks
-
objectCreatedHookMap
-
-
Constructor Details
-
AbstractInternalDeserializer
protected AbstractInternalDeserializer(ITypeIdProvider customTypeIdProvider, List<ClassLoader> classloaders, LEDataInputStream in)
-
-
Method Details
-
getObjectCount
public int getObjectCount() -
getObjects
-
getStream
-
deserializeInternal
- Throws:
IOException
-
close
- Throws:
IOException
-
read
- Throws:
IOException
-
read
- Throws:
IOException
-
readInternal
- Throws:
IOException
-
registerObject
-
loadClass
- Throws:
ClassNotFoundException
-
restoreFieldValue
protected void restoreFieldValue(Object o, Class<?> targetClass, int fieldId, Object fieldObject) throws SerializationException - Throws:
SerializationException
-
getCustomMethods
protected com.pnfsoftware.jeb.util.serialization.AbstractInternalDeserializer.CustomMethods getCustomMethods(Object o, Class<?> targetClass) throws SerializationException - Throws:
SerializationException
-
resolveDeferredObjects
protected void resolveDeferredObjects() -
setExpectedObjectCount
public void setExpectedObjectCount(int count) -
addProgressCallback
-
removeProgressCallback
-
notifyProgressCallbacks
protected void notifyProgressCallbacks() -
addObjectCreatedHook
-
removeObjectCreatedHook
-
notifyDeserializationEvent
- Parameters:
type
- event type: 1= object created (post creation)c
-o
-
-
logObjectMap
protected void logObjectMap() -
restoreFields
- Throws:
IOException
-