|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.jackson.JsonStreamContext
public abstract class JsonStreamContext
Shared base class for streaming processing contexts used during reading and writing of Json content using Streaming API. This context is also exposed to applications: context object can be used by applications to get an idea of relative position of the parser/generator within json content being processed. This allows for some contextual processing: for example, output within Array context can differ from that of Object context.
Field Summary | |
---|---|
protected int |
_index
Index of the currently processed entry. |
protected int |
_type
|
protected static int |
TYPE_ARRAY
|
protected static int |
TYPE_OBJECT
|
protected static int |
TYPE_ROOT
|
Constructor Summary | |
---|---|
JsonStreamContext(int type)
|
Method Summary | |
---|---|
int |
getCurrentIndex()
|
abstract String |
getCurrentName()
|
int |
getEntryCount()
|
abstract JsonStreamContext |
getParent()
|
String |
getTypeDesc()
|
boolean |
inArray()
Method that returns true if this context is an Array context; that is, content is being read from or written to a Json Array. |
boolean |
inObject()
Method that returns true if this context is an Object context; that is, content is being read from or written to a Json Object. |
boolean |
inRoot()
Method that returns true if this context is a Root context; that is, content is being read from or written to without enclosing array or object structure. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int TYPE_ROOT
protected static final int TYPE_ARRAY
protected static final int TYPE_OBJECT
protected int _type
protected int _index
Constructor Detail |
---|
public JsonStreamContext(int type)
Method Detail |
---|
public abstract JsonStreamContext getParent()
public final boolean inArray()
public final boolean inRoot()
public final boolean inObject()
public final String getTypeDesc()
public final int getEntryCount()
public final int getCurrentIndex()
public abstract String getCurrentName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |