Class CompiledPath
- java.lang.Object
-
- com.jayway.jsonpath.internal.path.CompiledPath
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
isRootPath
private static org.slf4j.Logger
logger
private RootPathToken
root
-
Constructor Summary
Constructors Constructor Description CompiledPath(RootPathToken root, boolean isRootPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EvaluationContext
evaluate(java.lang.Object document, java.lang.Object rootDocument, Configuration configuration)
Evaluates this pathEvaluationContext
evaluate(java.lang.Object document, java.lang.Object rootDocument, Configuration configuration, boolean forUpdate)
Evaluates this pathboolean
isDefinite()
boolean
isFunctionPath()
boolean
isRootPath()
java.lang.String
toString()
-
-
-
Field Detail
-
logger
private static final org.slf4j.Logger logger
-
root
private final RootPathToken root
-
isRootPath
private final boolean isRootPath
-
-
Constructor Detail
-
CompiledPath
public CompiledPath(RootPathToken root, boolean isRootPath)
-
-
Method Detail
-
isRootPath
public boolean isRootPath()
- Specified by:
isRootPath
in interfacePath
- Returns:
- true id this path is starts with '$' and false if the path starts with '@'
-
evaluate
public EvaluationContext evaluate(java.lang.Object document, java.lang.Object rootDocument, Configuration configuration, boolean forUpdate)
Description copied from interface:Path
Evaluates this path- Specified by:
evaluate
in interfacePath
- Parameters:
document
- the json document to apply the path onrootDocument
- the root json document that started this evaluationconfiguration
- configuration to useforUpdate
- is this a read or a write operation- Returns:
- EvaluationContext containing results of evaluation
-
evaluate
public EvaluationContext evaluate(java.lang.Object document, java.lang.Object rootDocument, Configuration configuration)
Description copied from interface:Path
Evaluates this path
-
isDefinite
public boolean isDefinite()
- Specified by:
isDefinite
in interfacePath
- Returns:
- true id this path is definite
-
isFunctionPath
public boolean isFunctionPath()
- Specified by:
isFunctionPath
in interfacePath
- Returns:
- true id this path is a function
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-