public abstract class JsonStreamContext
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
int |
getCurrentIndex() |
abstract java.lang.String |
getCurrentName()
Method for accessing name associated with the current location.
|
java.lang.Object |
getCurrentValue()
Method for accessing currently active value being used by data-binding
(as the source of streaming data to write, or destination of data being
read), at this level in hierarchy.
|
int |
getEntryCount() |
abstract JsonStreamContext |
getParent()
Accessor for finding parent context of this context; will
return null for root context.
|
java.lang.String |
getTypeDesc()
Deprecated.
Since 2.8 use
typeDesc() instead |
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.
|
void |
setCurrentValue(java.lang.Object v)
Method to call to pass value to be returned via
getCurrentValue() ; typically
called indirectly through JsonParser.setCurrentValue(java.lang.Object)
or JsonGenerator.setCurrentValue(java.lang.Object) ). |
java.lang.String |
typeDesc() |
public abstract JsonStreamContext getParent()
public final boolean inArray()
public final boolean inRoot()
public final boolean inObject()
@Deprecated public final java.lang.String getTypeDesc()
typeDesc()
insteadpublic java.lang.String typeDesc()
public final int getEntryCount()
public final int getCurrentIndex()
public abstract java.lang.String getCurrentName()
FIELD_NAME
and value events that directly
follow field names; null for root level and array values.public java.lang.Object getCurrentValue()
Note that "current value" is NOT populated (or used) by Streaming parser or generator; it is only used by higher-level data-binding functionality. The reason it is included here is that it can be stored and accessed hierarchically, and gets passed through data-binding.
public void setCurrentValue(java.lang.Object v)
getCurrentValue()
; typically
called indirectly through JsonParser.setCurrentValue(java.lang.Object)
or JsonGenerator.setCurrentValue(java.lang.Object)
)."Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"