Top Fields Constructors Methods
com.fasterxml.jackson.dataformat.toml

pack-priv final Class TomlWriteContext

extends JsonStreamContext
Class Inheritance
Imports
com.fasterxml.jackson.core.JsonStreamContext

Field Summary

Modifier and TypeField and Description
protected int
protected TomlWriteContext
protected String
_currentName

Name of the field of which value is to be parsed; only used for OBJECT contexts

protected 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

pack-priv boolean
protected final TomlWriteContext
_parent

Parent context for this context; null for root context.

Inherited from com.fasterxml.jackson.core.JsonStreamContext:
_index_nestingDepth_typeTYPE_ARRAYTYPE_OBJECTTYPE_ROOT

Constructor Summary

AccessConstructor and Description
pack-priv
TomlWriteContext(int type, TomlWriteContext parent, Object currValue, int basePathLength)

Method Summary

Modifier and TypeMethod and Description
public StringBuilder
public TomlWriteContext
createChildArrayContext(Object currValue, int basePathLength)

public TomlWriteContext
createChildObjectContext(Object currValue, int basePathLength)

pack-priv static TomlWriteContext
pack-priv static TomlWriteContext
createRootContext(int basePathLength)

public String
getCurrentName()

Implements abstract com.fasterxml.jackson.core.JsonStreamContext.getCurrentName.

Method for accessing name associated with the current location.

public Object
getCurrentValue()

Overrides com.fasterxml.jackson.core.JsonStreamContext.getCurrentValue.

Method for accessing currently active value being used by data-binding (as the source of streaming data to write, or destination of data being read), at this level in hierarchy.

public final TomlWriteContext
getParent()

Implements abstract com.fasterxml.jackson.core.JsonStreamContext.getParent.

Accessor for finding parent context of this context; will return null for root context.

private void
reset(int type, Object currValue, int basePathLength)

public void
setCurrentValue(Object
Current value to assign to this context
v
)

Overrides com.fasterxml.jackson.core.JsonStreamContext.setCurrentValue.

Method to call to pass value to be returned via getCurrentValue; typically called indirectly through JsonParser#setCurrentValue or JsonGenerator#setCurrentValue).

public final String
toString()

Overrides com.fasterxml.jackson.core.JsonStreamContext.toString.

Overridden to provide developer JsonPointer representation of the context.

public void
public boolean
public boolean
Inherited from com.fasterxml.jackson.core.JsonStreamContext:
getCurrentIndexgetEntryCountgetNestingDepthgetStartLocationgetTypeDeschasCurrentIndexhasCurrentNamehasPathSegmentinArrayinObjectinRootpathAsPointerpathAsPointerstartLocationtypeDesc

Field Detail

_basePathLengthback to summary
protected int _basePathLength
_childback to summary
protected TomlWriteContext _child
_currentNameback to summary
protected String _currentName

Name of the field of which value is to be parsed; only used for OBJECT contexts

_currentValueback to summary
protected Object _currentValue

Value that is being serialized and caused this context to be created; typically a POJO or container type.

_gotNameback to summary
protected boolean _gotName

Marker used to indicate that we just received a name, and now expect a value

_inlineback to summary
pack-priv boolean _inline
_parentback to summary
protected final TomlWriteContext _parent

Parent context for this context; null for root context.

Constructor Detail

TomlWriteContextback to summary
pack-priv TomlWriteContext(int type, TomlWriteContext parent, Object currValue, int basePathLength)

Method Detail

appendDescback to summary
public StringBuilder appendDesc(StringBuilder sb)
createChildArrayContextback to summary
public TomlWriteContext createChildArrayContext(Object currValue, int basePathLength)
createChildObjectContextback to summary
public TomlWriteContext createChildObjectContext(Object currValue, int basePathLength)
createRootContextback to summary
pack-priv static TomlWriteContext createRootContext()
createRootContextback to summary
pack-priv static TomlWriteContext createRootContext(int basePathLength)
getCurrentNameback to summary
public String getCurrentName()

Implements abstract com.fasterxml.jackson.core.JsonStreamContext.getCurrentName.

Doc from com.fasterxml.jackson.core.JsonStreamContext.getCurrentName.

Method for accessing name associated with the current location. Non-null for FIELD_NAME and value events that directly follow field names; null for root level and array values.

Returns:String

Current field name within context, if any; null if none

Annotations
@Override
getCurrentValueback to summary
public Object getCurrentValue()

Overrides com.fasterxml.jackson.core.JsonStreamContext.getCurrentValue.

Doc from com.fasterxml.jackson.core.JsonStreamContext.getCurrentValue.

Method for accessing currently active value being used by data-binding (as the source of streaming data to write, or destination of data being read), at this level in hierarchy.

Note that "current value" is NOT populated (or used) by Streaming parser or generator; it is only used by higher-level data-binding functionality. The reason it is included here is that it can be stored and accessed hierarchically, and gets passed through data-binding.

Returns:Object

Currently active value, if one has been assigned.

Annotations
@Override
getParentback to summary
public final TomlWriteContext getParent()

Implements abstract com.fasterxml.jackson.core.JsonStreamContext.getParent.

Doc from com.fasterxml.jackson.core.JsonStreamContext.getParent.

Accessor for finding parent context of this context; will return null for root context.

Returns:TomlWriteContext

Parent context of this context, if any; null for Root contexts

Annotations
@Override
resetback to summary
private void reset(int type, Object currValue, int basePathLength)
setCurrentValueback to summary
public void setCurrentValue(Object v)

Overrides com.fasterxml.jackson.core.JsonStreamContext.setCurrentValue.

Doc from com.fasterxml.jackson.core.JsonStreamContext.setCurrentValue.

Method to call to pass value to be returned via getCurrentValue; typically called indirectly through JsonParser#setCurrentValue or JsonGenerator#setCurrentValue).

Parameters
v:Object

Current value to assign to this context

Annotations
@Override
toStringback to summary
public final String toString()

Overrides com.fasterxml.jackson.core.JsonStreamContext.toString.

Overridden to provide developer JsonPointer representation of the context.

Returns:String

Doc from com.fasterxml.jackson.core.JsonStreamContext.toString.

Simple developer-readable description this context layer (note: NOT constructed with parents, unlike pathAsPointer)

Annotations
@Override
truncatePathback to summary
public void truncatePath(StringBuilder sb)
writeNameback to summary
public boolean writeName(String name)
writeValueback to summary
public boolean writeValue()