Top Fields Constructors Methods
com.fasterxml.jackson.dataformat.javaprop.io

public Class JPropWriteContext

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

Field Summary

Modifier and TypeField and Description
protected int
protected JPropWriteContext
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

protected final JPropWriteContext
_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
protected
JPropWriteContext(int type, JPropWriteContext parent, int basePathLength)

Method Summary

Modifier and TypeMethod and Description
public StringBuilder
public JPropWriteContext
createChildArrayContext(int basePathLength)

public JPropWriteContext
createChildObjectContext(int basePathLength)

public static JPropWriteContext
public static JPropWriteContext
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 JPropWriteContext
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, 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 JPropWriteContext _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

_parentback to summary
protected final JPropWriteContext _parent

Parent context for this context; null for root context.

Constructor Detail

JPropWriteContextback to summary
protected JPropWriteContext(int type, JPropWriteContext parent, int basePathLength)

Method Detail

appendDescback to summary
public StringBuilder appendDesc(StringBuilder sb)
createChildArrayContextback to summary
public JPropWriteContext createChildArrayContext(int basePathLength)
createChildObjectContextback to summary
public JPropWriteContext createChildObjectContext(int basePathLength)
createRootContextback to summary
public static JPropWriteContext createRootContext()
createRootContextback to summary
public static JPropWriteContext 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 JPropWriteContext 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:JPropWriteContext

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

Annotations
@Override
resetback to summary
private void reset(int type, 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)
writeFieldNameback to summary
public boolean writeFieldName(String name) throws JsonProcessingException
writeValueback to summary
public boolean writeValue()