public abstract class AbstractEncodingContext extends java.lang.Object implements IEncodingContext
Modifier and Type | Field and Description |
---|---|
protected java.lang.ClassLoader |
classloader
The classloader
|
protected boolean |
ignorewriteclass
Flag indicating class names should not be written (can be temporarily disabled for one write).
|
protected java.util.Set<java.lang.Class> |
nonanonclasscache
The cache for non-inner classes.
|
protected java.util.List<ITraverseProcessor> |
preprocessors
The preprocessors.
|
protected java.lang.Object |
rootobject
The root object.
|
protected java.lang.Object |
usercontext
A user context.
|
protected long |
writtenbytes
The bytes written to the output.
|
Constructor and Description |
---|
AbstractEncodingContext(java.lang.Object rootobject,
java.lang.Object usercontext,
java.util.List<ITraverseProcessor> preprocessors,
java.lang.ClassLoader classloader) |
Modifier and Type | Method and Description |
---|---|
java.lang.ClassLoader |
getClassLoader()
Gets the classloader.
|
java.util.Set<java.lang.Class> |
getNonInnerClassCache()
Returns the non-inner class cache.
|
java.util.List<ITraverseProcessor> |
getPreprocessors()
Returns the preprocessors.
|
java.lang.Object |
getRootObject()
Get the rootobject.
|
java.lang.Object |
getUserContext()
Returns the user context.
|
long |
getWrittenBytes()
Returns the number of bytes written.
|
protected boolean |
isIgnoreNextClassWrite() |
void |
setIgnoreNextClassWrite(boolean state)
Puts the context in a state where the next call to
writeClass is ignored.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
write, writeBoolean, writeByte, writeClass, writeClassname, writeSignedVarInt, writeString, writeVarInt
protected java.util.List<ITraverseProcessor> preprocessors
protected java.lang.ClassLoader classloader
protected java.lang.Object rootobject
protected java.lang.Object usercontext
protected boolean ignorewriteclass
protected java.util.Set<java.lang.Class> nonanonclasscache
protected long writtenbytes
public AbstractEncodingContext(java.lang.Object rootobject, java.lang.Object usercontext, java.util.List<ITraverseProcessor> preprocessors, java.lang.ClassLoader classloader)
public java.util.List<ITraverseProcessor> getPreprocessors()
getPreprocessors
in interface IEncodingContext
public java.lang.ClassLoader getClassLoader()
getClassLoader
in interface IEncodingContext
public java.lang.Object getRootObject()
getRootObject
in interface IEncodingContext
public long getWrittenBytes()
getWrittenBytes
in interface IEncodingContext
public java.lang.Object getUserContext()
getUserContext
in interface IEncodingContext
public java.util.Set<java.lang.Class> getNonInnerClassCache()
getNonInnerClassCache
in interface IEncodingContext
public void setIgnoreNextClassWrite(boolean state)
setIgnoreNextClassWrite
in interface IEncodingContext
state
- If true, the next class write will be ignored and the state reset.protected boolean isIgnoreNextClassWrite()