Class TomlWriteContext
- java.lang.Object
-
- com.fasterxml.jackson.core.JsonStreamContext
-
- com.fasterxml.jackson.dataformat.toml.TomlWriteContext
-
final class TomlWriteContext extends com.fasterxml.jackson.core.JsonStreamContext
-
-
Field Summary
Fields Modifier and Type Field Description protected int
_basePathLength
protected TomlWriteContext
_child
protected java.lang.String
_currentName
Name of the field of which value is to be parsed; only used for OBJECT contextsprotected java.lang.Object
_currentValue
Value that is being serialized and caused this context to be created; typically a POJO or container type.protected boolean
_gotName
Marker used to indicate that we just received a name, and now expect a value(package private) boolean
_inline
protected TomlWriteContext
_parent
Parent context for this context; null for root context.
-
Constructor Summary
Constructors Constructor Description TomlWriteContext(int type, TomlWriteContext parent, java.lang.Object currValue, int basePathLength)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringBuilder
appendDesc(java.lang.StringBuilder sb)
TomlWriteContext
createChildArrayContext(java.lang.Object currValue, int basePathLength)
TomlWriteContext
createChildObjectContext(java.lang.Object currValue, int basePathLength)
(package private) static TomlWriteContext
createRootContext()
(package private) static TomlWriteContext
createRootContext(int basePathLength)
java.lang.String
getCurrentName()
java.lang.Object
getCurrentValue()
TomlWriteContext
getParent()
private void
reset(int type, java.lang.Object currValue, int basePathLength)
void
setCurrentValue(java.lang.Object v)
java.lang.String
toString()
Overridden to provide developer JsonPointer representation of the context.void
truncatePath(java.lang.StringBuilder sb)
boolean
writeName(java.lang.String name)
boolean
writeValue()
-
-
-
Field Detail
-
_parent
protected final TomlWriteContext _parent
Parent context for this context; null for root context.
-
_child
protected TomlWriteContext _child
-
_currentValue
protected java.lang.Object _currentValue
Value that is being serialized and caused this context to be created; typically a POJO or container type.
-
_gotName
protected boolean _gotName
Marker used to indicate that we just received a name, and now expect a value
-
_currentName
protected java.lang.String _currentName
Name of the field of which value is to be parsed; only used for OBJECT contexts
-
_basePathLength
protected int _basePathLength
-
_inline
boolean _inline
-
-
Constructor Detail
-
TomlWriteContext
TomlWriteContext(int type, TomlWriteContext parent, java.lang.Object currValue, int basePathLength)
-
-
Method Detail
-
reset
private void reset(int type, java.lang.Object currValue, int basePathLength)
-
createRootContext
static TomlWriteContext createRootContext()
-
createRootContext
static TomlWriteContext createRootContext(int basePathLength)
-
createChildArrayContext
public TomlWriteContext createChildArrayContext(java.lang.Object currValue, int basePathLength)
-
createChildObjectContext
public TomlWriteContext createChildObjectContext(java.lang.Object currValue, int basePathLength)
-
writeName
public boolean writeName(java.lang.String name)
-
writeValue
public boolean writeValue()
-
truncatePath
public void truncatePath(java.lang.StringBuilder sb)
-
getParent
public final TomlWriteContext getParent()
- Specified by:
getParent
in classcom.fasterxml.jackson.core.JsonStreamContext
-
getCurrentName
public java.lang.String getCurrentName()
- Specified by:
getCurrentName
in classcom.fasterxml.jackson.core.JsonStreamContext
-
getCurrentValue
public java.lang.Object getCurrentValue()
- Overrides:
getCurrentValue
in classcom.fasterxml.jackson.core.JsonStreamContext
-
setCurrentValue
public void setCurrentValue(java.lang.Object v)
- Overrides:
setCurrentValue
in classcom.fasterxml.jackson.core.JsonStreamContext
-
appendDesc
public java.lang.StringBuilder appendDesc(java.lang.StringBuilder sb)
-
toString
public final java.lang.String toString()
Overridden to provide developer JsonPointer representation of the context.- Overrides:
toString
in classcom.fasterxml.jackson.core.JsonStreamContext
-
-