Package com.alibaba.fastjson2
Class JSONPathCompilerReflect.TwoNameSegmentTypedPath
java.lang.Object
com.alibaba.fastjson2.JSONPath
com.alibaba.fastjson2.JSONPathCompilerReflect.TwoNameSegmentTypedPath
- Enclosing class:
JSONPathCompilerReflect
-
Nested Class Summary
Nested classes/interfaces inherited from class com.alibaba.fastjson2.JSONPath
JSONPath.Feature -
Constructor Summary
ConstructorsConstructorDescriptionTwoNameSegmentTypedPath(String path, JSONPathCompilerReflect.NameSegmentTyped first, JSONPathCompilerReflect.NameSegmentTyped second) -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the path exists in the objectbooleanChecks if this path ends with a filterbooleanEvaluates the path on the objectextract(JSONReader jsonReader) Extracts a value using the provided JSONReaderextractScalar(JSONReader jsonReader) Extracts a scalar value using the provided JSONReaderGets the parent JSONPath of this pathinthashCode()booleanisRef()Checks if this path is a referencebooleanRemoves a value from the objectvoidSets a value in the objectvoidset(Object root, Object value, JSONReader.Feature... readerFeatures) Sets a value in the object with specified reader featuresvoidsetCallback(Object root, BiFunction callback) Sets a callback function for the objectvoidSets an integer value in the objectvoidSets a long value in the objectMethods inherited from class com.alibaba.fastjson2.JSONPath
arrayAdd, compile, compile, contains, createContext, eval, eval, extract, extract, extract, extract, extract, extract, extractInt32, extractInt32Value, extractInt64, extractInt64Value, extractScalar, getReaderContext, getWriterContext, isPrevious, of, of, of, of, of, of, of, paths, remove, remove, set, set, setCallback, setCallback, setCallback, setReaderContext, setWriterContext, toString
-
Constructor Details
-
TwoNameSegmentTypedPath
public TwoNameSegmentTypedPath(String path, JSONPathCompilerReflect.NameSegmentTyped first, JSONPathCompilerReflect.NameSegmentTyped second)
-
-
Method Details
-
eval
Description copied from class:JSONPathEvaluates the path on the object- Parameters:
root- the object to evaluate- Returns:
- the evaluation result
-
set
Description copied from class:JSONPathSets a value in the object- Parameters:
root- the object to modifyvalue- the value to set
-
setInt
Description copied from class:JSONPathSets an integer value in the object- Parameters:
root- the object to modifyvalue- the integer value to set
-
setLong
Description copied from class:JSONPathSets a long value in the object- Parameters:
root- the object to modifyvalue- the long value to set
-
setCallback
Description copied from class:JSONPathSets a callback function for the object- Parameters:
root- the object to modifycallback- the callback function to set
-
endsWithFilter
public boolean endsWithFilter()Description copied from class:JSONPathChecks if this path ends with a filter- Overrides:
endsWithFilterin classJSONPath- Returns:
- true if this path ends with a filter, false otherwise
-
getParent
Description copied from class:JSONPathGets the parent JSONPath of this path -
remove
Description copied from class:JSONPathRemoves a value from the object -
contains
Description copied from class:JSONPathChecks if the path exists in the object -
isRef
public boolean isRef()Description copied from class:JSONPathChecks if this path is a reference -
set
Description copied from class:JSONPathSets a value in the object with specified reader features -
extract
Description copied from class:JSONPathExtracts a value using the provided JSONReader -
extractScalar
Description copied from class:JSONPathExtracts a scalar value using the provided JSONReader- Specified by:
extractScalarin classJSONPath- Parameters:
jsonReader- the JSONReader to use- Returns:
- the extracted scalar value
-
equals
-
hashCode
public int hashCode()
-