com.jasonclawson.jackson.dataformat.hocon
Class HoconNodeCursor

java.lang.Object
  extended by com.fasterxml.jackson.core.JsonStreamContext
      extended by com.jasonclawson.jackson.dataformat.hocon.HoconNodeCursor
Direct Known Subclasses:
HoconNodeCursor.Array, HoconNodeCursor.NumericallyIndexedObjectBackedArray, HoconNodeCursor.Object, HoconNodeCursor.RootValue

public abstract class HoconNodeCursor
extends com.fasterxml.jackson.core.JsonStreamContext


Nested Class Summary
protected static class HoconNodeCursor.Array
          Cursor used for traversing non-empty JSON Array nodes
protected static class HoconNodeCursor.NumericallyIndexedObjectBackedArray
          Cursor used for traversing non-empty JSON Object nodes and converting them to Arrays because they have numerically indexed keys
protected static class HoconNodeCursor.Object
          Cursor used for traversing non-empty JSON Object nodes
protected static class HoconNodeCursor.RootValue
           
 
Field Summary
protected  String _currentName
           
protected  HoconNodeCursor _parent
           
 
Fields inherited from class com.fasterxml.jackson.core.JsonStreamContext
_index, _type, TYPE_ARRAY, TYPE_OBJECT, TYPE_ROOT
 
Constructor Summary
HoconNodeCursor(int contextType, HoconNodeCursor p)
           
 
Method Summary
protected static com.fasterxml.jackson.core.JsonToken asJsonToken(com.typesafe.config.ConfigValue value)
           
 String constructPath()
          HOCON specific method to construct the path for this node.
abstract  boolean currentHasChildren()
           
abstract  com.typesafe.config.ConfigValue currentNode()
           
abstract  com.fasterxml.jackson.core.JsonToken endToken()
           
 String getCurrentName()
           
 HoconNodeCursor getParent()
           
protected static boolean isArray(com.typesafe.config.ConfigValue value)
           
static boolean isNumericallyIndexed(com.typesafe.config.ConfigValue n)
           
protected static boolean isObject(com.typesafe.config.ConfigValue value)
           
 HoconNodeCursor iterateChildren()
          Method called to create a new context for iterating all contents of the current structured value (JSON array or object)
abstract  com.fasterxml.jackson.core.JsonToken nextToken()
           
 void overrideCurrentName(String name)
           
 
Methods inherited from class com.fasterxml.jackson.core.JsonStreamContext
getCurrentIndex, getEntryCount, getTypeDesc, inArray, inObject, inRoot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_parent

protected final HoconNodeCursor _parent

_currentName

protected String _currentName
Constructor Detail

HoconNodeCursor

public HoconNodeCursor(int contextType,
                       HoconNodeCursor p)
Method Detail

getParent

public HoconNodeCursor 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

overrideCurrentName

public void overrideCurrentName(String name)

constructPath

public String constructPath()
HOCON specific method to construct the path for this node. Useful for interacting directly with the underlying Config instance in custom deserializers.

Returns:
The path of this node cursor.

nextToken

public abstract com.fasterxml.jackson.core.JsonToken nextToken()

endToken

public abstract com.fasterxml.jackson.core.JsonToken endToken()

currentNode

public abstract com.typesafe.config.ConfigValue currentNode()

currentHasChildren

public abstract boolean currentHasChildren()

isArray

protected static boolean isArray(com.typesafe.config.ConfigValue value)

isObject

protected static boolean isObject(com.typesafe.config.ConfigValue value)

asJsonToken

protected static com.fasterxml.jackson.core.JsonToken asJsonToken(com.typesafe.config.ConfigValue value)

iterateChildren

public final HoconNodeCursor iterateChildren()
Method called to create a new context for iterating all contents of the current structured value (JSON array or object)


isNumericallyIndexed

public static boolean isNumericallyIndexed(com.typesafe.config.ConfigValue n)


Copyright © 2015. All Rights Reserved.