Class TokenBufferReadContext
java.lang.Object
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.core.JsonStreamContext
edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.databind.util.TokenBufferReadContext
Implementation of
JsonStreamContext
used by TokenBuffer
to link back to the original context to try to keep location information
consistent between source location and buffered content when it's re-read
from the buffer.- Since:
- 2.9
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected Object
protected final JsonStreamContext
protected final JsonLocation
Fields inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.core.JsonStreamContext
_index, _type, TYPE_ARRAY, TYPE_OBJECT, TYPE_ROOT
-
Constructor Summary
ModifierConstructorDescriptionprotected
Constructor for case where there is no real surrounding context: just create virtual ROOTprotected
TokenBufferReadContext
(JsonStreamContext base, ContentReference srcRef) protected
TokenBufferReadContext
(JsonStreamContext base, JsonLocation startLoc) protected
TokenBufferReadContext
(JsonStreamContext base, Object srcRef) Deprecated.protected
TokenBufferReadContext
(TokenBufferReadContext parent, int type, int index) -
Method Summary
Modifier and TypeMethodDescriptionstatic TokenBufferReadContext
createRootContext
(JsonStreamContext origContext) Method for accessing name associated with the current location.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.Accessor for finding parent context of this context; will return null for root context.boolean
Helper method we need to handle discontinuity between "real" contexts buffer creates, and ones from parent: problem being they are of different types.void
setCurrentName
(String name) void
Method to call to pass value to be returned viaJsonStreamContext.getCurrentValue()
; typically called indirectly throughJsonParser.setCurrentValue(java.lang.Object)
orJsonGenerator.setCurrentValue(java.lang.Object)
).void
Methods inherited from class edu.internet2.middleware.grouperClientExt.com.fasterxml.jackson.core.JsonStreamContext
getCurrentIndex, getEntryCount, getStartLocation, getTypeDesc, hasCurrentIndex, hasPathSegment, inArray, inObject, inRoot, pathAsPointer, pathAsPointer, startLocation, toString, typeDesc
-
Field Details
-
_parent
-
_startLocation
-
_currentName
-
_currentValue
-
-
Constructor Details
-
TokenBufferReadContext
- Since:
- 2.13
-
TokenBufferReadContext
Deprecated. -
TokenBufferReadContext
-
TokenBufferReadContext
protected TokenBufferReadContext()Constructor for case where there is no real surrounding context: just create virtual ROOT -
TokenBufferReadContext
-
-
Method Details
-
getCurrentValue
Description copied from class:JsonStreamContext
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.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.
- Overrides:
getCurrentValue
in classJsonStreamContext
- Returns:
- Currently active value, if one has been assigned.
-
setCurrentValue
Description copied from class:JsonStreamContext
Method to call to pass value to be returned viaJsonStreamContext.getCurrentValue()
; typically called indirectly throughJsonParser.setCurrentValue(java.lang.Object)
orJsonGenerator.setCurrentValue(java.lang.Object)
).- Overrides:
setCurrentValue
in classJsonStreamContext
- Parameters:
v
- Current value to assign to this context
-
createRootContext
-
createChildArrayContext
-
createChildObjectContext
-
parentOrCopy
Helper method we need to handle discontinuity between "real" contexts buffer creates, and ones from parent: problem being they are of different types. -
getCurrentName
Description copied from class:JsonStreamContext
Method for accessing name associated with the current location. Non-null forFIELD_NAME
and value events that directly follow field names; null for root level and array values.- Specified by:
getCurrentName
in classJsonStreamContext
- Returns:
- Current field name within context, if any;
null
if none
-
hasCurrentName
public boolean hasCurrentName()- Overrides:
hasCurrentName
in classJsonStreamContext
- Returns:
True
if a call toJsonStreamContext.getCurrentName()
would return non-null
name;false
otherwise
-
getParent
Description copied from class:JsonStreamContext
Accessor for finding parent context of this context; will return null for root context.- Specified by:
getParent
in classJsonStreamContext
- Returns:
- Parent context of this context, if any;
null
for Root contexts
-
setCurrentName
- Throws:
JsonProcessingException
-
updateForValue
public void updateForValue()- Since:
- 2.10.1
-