com.fasterxml.jackson.dataformat.javaprop.io

## Class JPropWriteContext

- java.lang.Object
- - com.fasterxml.jackson.core.JsonStreamContext
  - - com.fasterxml.jackson.dataformat.javaprop.io.JPropWriteContext

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

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `_basePathLength`
    `protected JPropWriteContext` | `_child`
    `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 JPropWriteContext` | `_parent` Parent context for this context; null for root context.

    - ### 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` | `JPropWriteContext(int type, JPropWriteContext parent, int basePathLength)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `StringBuilder` | `appendDesc(StringBuilder sb)`
    `JPropWriteContext` | `createChildArrayContext(int basePathLength)`
    `JPropWriteContext` | `createChildObjectContext(int basePathLength)`
    `static JPropWriteContext` | `createRootContext()`
    `static JPropWriteContext` | `createRootContext(int basePathLength)`
    `String` | `getCurrentName()`
    `Object` | `getCurrentValue()`
    `JPropWriteContext` | `getParent()`
    `void` | `setCurrentValue(Object v)`
    `String` | `toString()` Overridden to provide developer JsonPointer representation of the context.
    `void` | `truncatePath(StringBuilder sb)`
    `boolean` | `writeFieldName(String name)`
    `boolean` | `writeValue()`

    - ### 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 JPropWriteContext _parent

      Parent context for this context; null for root context.

    - #### _child

          protected JPropWriteContext _child

    - #### _currentValue

          protected 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 String _currentName

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

    - #### _basePathLength

          protected int _basePathLength

  - ### Constructor Detail

    - #### JPropWriteContext

          protected JPropWriteContext(int type,
                           JPropWriteContext parent,
                           int basePathLength)

  - ### Method Detail

    - #### createRootContext

          public static JPropWriteContext createRootContext()

    - #### createRootContext

          public static JPropWriteContext createRootContext(int basePathLength)

    - #### createChildArrayContext

          public JPropWriteContext createChildArrayContext(int basePathLength)

    - #### createChildObjectContext

          public JPropWriteContext createChildObjectContext(int basePathLength)

    - #### writeFieldName

          public boolean writeFieldName(String name)
                                 throws com.fasterxml.jackson.core.JsonProcessingException

      Throws:
        `com.fasterxml.jackson.core.JsonProcessingException`

    - #### writeValue

          public boolean writeValue()

    - #### truncatePath

          public void truncatePath(StringBuilder sb)

    - #### getParent

          public final JPropWriteContext 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`

    - #### 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 © 2017 FasterXML. All rights reserved.