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

public Class ProtobufWriteContext

extends JsonStreamContext
Class Inheritance
Imports
com.fasterxml.jackson.core.JsonStreamContext, com.fasterxml.jackson.dataformat.protobuf.schema.ProtobufField, .ProtobufMessage

Field Summary

Modifier and TypeField and Description
protected ProtobufWriteContext
protected Object
protected ProtobufField
_field

Field within either current object (for Object context); or, parent field (for Array)

protected ProtobufMessage
_message

Definition of the closest Object that this context relates to; either object for the field (for Message/Object types), or its parent (for Array types)

protected final ProtobufWriteContext
Inherited from com.fasterxml.jackson.core.JsonStreamContext:
_index_nestingDepth_typeTYPE_ARRAYTYPE_OBJECTTYPE_ROOT

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public StringBuilder
public ProtobufWriteContext
public ProtobufWriteContext
public static ProtobufWriteContext
createNullContext()

Factory method called to get a placeholder context that is only in place until actual schema is handed.

public static ProtobufWriteContext
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 ProtobufField
public ProtobufMessage
public final ProtobufWriteContext
getParent()

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

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

public boolean
private void
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 void
public final String
toString()

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

Overridden to provide developer JsonPointer representation of the context.

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

Field Detail

_childback to summary
protected ProtobufWriteContext _child
_currentValueback to summary
protected Object _currentValue
Since
2.5
_fieldback to summary
protected ProtobufField _field

Field within either current object (for Object context); or, parent field (for Array)

_messageback to summary
protected ProtobufMessage _message

Definition of the closest Object that this context relates to; either object for the field (for Message/Object types), or its parent (for Array types)

_parentback to summary
protected final ProtobufWriteContext _parent

Constructor Detail

ProtobufWriteContextback to summary
protected ProtobufWriteContext(int type, ProtobufWriteContext parent, ProtobufMessage msg)

Method Detail

appendDescback to summary
public StringBuilder appendDesc(StringBuilder sb)
createChildArrayContextback to summary
public ProtobufWriteContext createChildArrayContext()
createChildObjectContextback to summary
public ProtobufWriteContext createChildObjectContext(ProtobufMessage type)
createNullContextback to summary
public static ProtobufWriteContext createNullContext()

Factory method called to get a placeholder context that is only in place until actual schema is handed.

createRootContextback to summary
public static ProtobufWriteContext createRootContext(ProtobufMessage msg)
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
getFieldback to summary
public ProtobufField getField()
getMessageTypeback to summary
public ProtobufMessage getMessageType()
getParentback to summary
public final ProtobufWriteContext 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:ProtobufWriteContext

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

Annotations
@Override
notArrayback to summary
public boolean notArray()
resetback to summary
private void reset(int type, ProtobufMessage msg, ProtobufField f)
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
setFieldback to summary
public void setField(ProtobufField f)
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