final class JSONPathSingleName extends JSONPathSingle
JSONPath.Context, JSONPath.Feature, JSONPath.PreviousPath, JSONPath.RootPath, JSONPath.Sequence| Modifier and Type | Field and Description |
|---|---|
(package private) java.lang.String |
name |
(package private) long |
nameHashCode |
extractSupport, ref, segmentfeatures, PARSE_CONTEXT, path, readerContext, writerContext| Constructor and Description |
|---|
JSONPathSingleName(java.lang.String path,
JSONPathSegmentName segment,
JSONPath.Feature... features) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(java.lang.Object root)
Checks if the path exists in the object
|
java.lang.Object |
eval(java.lang.Object root)
Evaluates the path on the object
|
java.lang.Object |
extract(JSONReader jsonReader)
Extracts a value using the provided JSONReader
|
void |
extract(JSONReader jsonReader,
ValueConsumer consumer)
Extracts a value using the provided JSONReader and passes it to the consumer
|
int |
extractInt32Value(JSONReader jsonReader)
Extracts an int value using the provided JSONReader
|
long |
extractInt64Value(JSONReader jsonReader)
Extracts a long value using the provided JSONReader
|
java.lang.String |
extractScalar(JSONReader jsonReader)
Extracts a scalar value using the provided JSONReader
|
void |
extractScalar(JSONReader jsonReader,
ValueConsumer consumer)
Extracts a scalar value using the provided JSONReader and passes it to the consumer
|
boolean |
isRef()
Checks if this path is a reference
|
boolean |
remove(java.lang.Object root)
Removes a value from the object
|
void |
set(java.lang.Object rootObject,
java.lang.Object value)
Sets a value in the object
|
void |
set(java.lang.Object rootObject,
java.lang.Object value,
JSONReader.Feature... readerFeatures)
Sets a value in the object with specified reader features
|
void |
setCallback(java.lang.Object object,
java.util.function.BiFunction callback)
Sets a callback function for the object
|
void |
setInt(java.lang.Object obejct,
int value)
Sets an integer value in the object
|
void |
setLong(java.lang.Object object,
long value)
Sets a long value in the object
|
equals, getParent, hashCodearrayAdd, compile, compile, contains, createContext, endsWithFilter, eval, eval, extract, extract, extract, extract, extract, extractInt32, extractInt64, getReaderContext, getWriterContext, isPrevious, of, of, of, of, of, of, of, of, parseOperator, paths, paths, remove, remove, set, set, setCallback, setCallback, setCallback, setReaderContext, setWriterContext, toStringpublic JSONPathSingleName(java.lang.String path,
JSONPathSegmentName segment,
JSONPath.Feature... features)
public java.lang.Object eval(java.lang.Object root)
JSONPatheval in class JSONPathSingleroot - the object to evaluatepublic boolean remove(java.lang.Object root)
JSONPathremove in class JSONPathSingleroot - the object to modifypublic boolean isRef()
JSONPathisRef in class JSONPathSinglepublic boolean contains(java.lang.Object root)
JSONPathcontains in class JSONPathSingleroot - the object to checkpublic void set(java.lang.Object rootObject,
java.lang.Object value)
JSONPathset in class JSONPathSinglerootObject - the object to modifyvalue - the value to setpublic void set(java.lang.Object rootObject,
java.lang.Object value,
JSONReader.Feature... readerFeatures)
JSONPathset in class JSONPathSinglerootObject - the object to modifyvalue - the value to setreaderFeatures - the reader features to applypublic void setCallback(java.lang.Object object,
java.util.function.BiFunction callback)
JSONPathsetCallback in class JSONPathSingleobject - the object to modifycallback - the callback function to setpublic void setInt(java.lang.Object obejct,
int value)
JSONPathsetInt in class JSONPathSingleobejct - the object to modifyvalue - the integer value to setpublic void setLong(java.lang.Object object,
long value)
JSONPathsetLong in class JSONPathSingleobject - the object to modifyvalue - the long value to setpublic java.lang.Object extract(JSONReader jsonReader)
JSONPathextract in class JSONPathSinglejsonReader - the JSONReader to usepublic java.lang.String extractScalar(JSONReader jsonReader)
JSONPathextractScalar in class JSONPathSinglejsonReader - the JSONReader to usepublic long extractInt64Value(JSONReader jsonReader)
JSONPathextractInt64Value in class JSONPathjsonReader - the JSONReader to usepublic int extractInt32Value(JSONReader jsonReader)
JSONPathextractInt32Value in class JSONPathjsonReader - the JSONReader to usepublic void extractScalar(JSONReader jsonReader, ValueConsumer consumer)
JSONPathextractScalar in class JSONPathjsonReader - the JSONReader to useconsumer - the consumer to accept the extracted scalar valuepublic void extract(JSONReader jsonReader, ValueConsumer consumer)
JSONPath