org.codehaus.jackson.impl
Class JsonReadContext

java.lang.Object
  extended by org.codehaus.jackson.JsonStreamContext
      extended by org.codehaus.jackson.impl.JsonReadContext

public final class JsonReadContext
extends JsonStreamContext

Extension of JsonStreamContext, which implements core methods needed, and also exposes more complete API to parser implementation classes.


Field Summary
protected  int _columnNr
           
protected  String _currentName
           
protected  int _lineNr
           
protected  JsonReadContext _parent
           
 
Fields inherited from class org.codehaus.jackson.JsonStreamContext
_index, _type, TYPE_ARRAY, TYPE_OBJECT, TYPE_ROOT
 
Constructor Summary
JsonReadContext(JsonReadContext parent, int type, int lineNr, int colNr)
           
 
Method Summary
 JsonReadContext createChildArrayContext(int lineNr, int colNr)
           
 JsonReadContext createChildObjectContext(int lineNr, int colNr)
           
static JsonReadContext createRootContext(int lineNr, int colNr)
           
 boolean expectComma()
           
 String getCurrentName()
           
 JsonReadContext getParent()
           
 JsonLocation getStartLocation(Object srcRef)
           
protected  void reset(int type, int lineNr, int colNr)
           
 void setCurrentName(String name)
           
 String toString()
          Overridden to provide developer readable "JsonPath" representation of the context.
 
Methods inherited from class org.codehaus.jackson.JsonStreamContext
getCurrentIndex, getEntryCount, getTypeDesc, inArray, inObject, inRoot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_parent

protected final JsonReadContext _parent

_lineNr

protected int _lineNr

_columnNr

protected int _columnNr

_currentName

protected String _currentName
Constructor Detail

JsonReadContext

public JsonReadContext(JsonReadContext parent,
                       int type,
                       int lineNr,
                       int colNr)
Method Detail

reset

protected final void reset(int type,
                           int lineNr,
                           int colNr)

createRootContext

public static JsonReadContext createRootContext(int lineNr,
                                                int colNr)

createChildArrayContext

public final JsonReadContext createChildArrayContext(int lineNr,
                                                     int colNr)

createChildObjectContext

public final JsonReadContext createChildObjectContext(int lineNr,
                                                      int colNr)

getCurrentName

public final String getCurrentName()
Specified by:
getCurrentName in class JsonStreamContext

getParent

public final JsonReadContext getParent()
Specified by:
getParent in class JsonStreamContext

getStartLocation

public final JsonLocation getStartLocation(Object srcRef)
Returns:
Location pointing to the point where the context start marker was found

expectComma

public final boolean expectComma()

setCurrentName

public void setCurrentName(String name)

toString

public final String toString()
Overridden to provide developer readable "JsonPath" representation of the context.

Overrides:
toString in class Object