com.fasterxml.jackson.dataformat.protobuf

## Class ProtobufWriteContext

- java.lang.Object
- - com.fasterxml.jackson.core.JsonStreamContext
  - - com.fasterxml.jackson.dataformat.protobuf.ProtobufWriteContext

-     public class ProtobufWriteContext
      extends com.fasterxml.jackson.core.JsonStreamContext

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ProtobufWriteContext` | `_child`
    `protected Object` | `_currentValue`
    `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 ProtobufWriteContext` | `_parent`

    - ### Fields inherited from class com.fasterxml.jackson.core.JsonStreamContext

      `_index, _type, TYPE_ARRAY, TYPE_OBJECT, TYPE_ROOT`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ProtobufWriteContext(int type, ProtobufWriteContext parent, ProtobufMessage msg)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `StringBuilder` | `appendDesc(StringBuilder sb)`
    `ProtobufWriteContext` | `createChildArrayContext()`
    `ProtobufWriteContext` | `createChildObjectContext(ProtobufMessage type)`
    `static ProtobufWriteContext` | `createNullContext()` Factory method called to get a placeholder context that is only in place until actual schema is handed.
    `static ProtobufWriteContext` | `createRootContext(ProtobufMessage msg)`
    `String` | `getCurrentName()`
    `Object` | `getCurrentValue()`
    `ProtobufField` | `getField()`
    `ProtobufMessage` | `getMessageType()`
    `ProtobufWriteContext` | `getParent()`
    `boolean` | `notArray()`
    `void` | `setCurrentValue(Object v)`
    `void` | `setField(ProtobufField f)`
    `String` | `toString()` Overridden to provide developer JsonPointer representation of the context.

    - ### Methods inherited from class com.fasterxml.jackson.core.JsonStreamContext

      `getCurrentIndex, getEntryCount, getStartLocation, getTypeDesc, hasCurrentIndex, hasCurrentName, hasPathSegment, inArray, inObject, inRoot, pathAsPointer, pathAsPointer, typeDesc`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### _parent

          protected final ProtobufWriteContext _parent

    - #### _message

          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)

    - #### _field

          protected ProtobufField _field

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

    - #### _currentValue

          protected Object _currentValue

      Since:
        2.5

    - #### _child

          protected ProtobufWriteContext _child

  - ### Constructor Detail

    - #### ProtobufWriteContext

          protected ProtobufWriteContext(int type,
                                         ProtobufWriteContext parent,
                                         ProtobufMessage msg)

  - ### Method Detail

    - #### createRootContext

          public static ProtobufWriteContext createRootContext(ProtobufMessage msg)

    - #### createNullContext

          public static ProtobufWriteContext createNullContext()

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

    - #### createChildArrayContext

          public ProtobufWriteContext createChildArrayContext()

    - #### createChildObjectContext

          public ProtobufWriteContext createChildObjectContext(ProtobufMessage type)

    - #### getParent

          public final ProtobufWriteContext getParent()

      Specified by:
        `getParent` in class `com.fasterxml.jackson.core.JsonStreamContext`

    - #### getCurrentName

          public String getCurrentName()

      Specified by:
        `getCurrentName` in class `com.fasterxml.jackson.core.JsonStreamContext`

    - #### getCurrentValue

          public Object getCurrentValue()

      Overrides:
        `getCurrentValue` in class `com.fasterxml.jackson.core.JsonStreamContext`

    - #### setCurrentValue

          public void setCurrentValue(Object v)

      Overrides:
        `setCurrentValue` in class `com.fasterxml.jackson.core.JsonStreamContext`

    - #### setField

          public void setField(ProtobufField f)

    - #### getField

          public ProtobufField getField()

    - #### getMessageType

          public ProtobufMessage getMessageType()

    - #### notArray

          public boolean notArray()

    - #### appendDesc

          public StringBuilder appendDesc(StringBuilder sb)

    - #### toString

          public final String toString()

      Overridden to provide developer JsonPointer representation of the context.
      Overrides:
        `toString` in class `com.fasterxml.jackson.core.JsonStreamContext`

Copyright © 2019 FasterXML. All rights reserved.