Class CompiledPath
- java.lang.Object
-
- com.jayway.jsonpath.internal.path.CompiledPath
-
-
Constructor Summary
Constructors Constructor Description CompiledPath(RootPathToken root, boolean isRootPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EvaluationContextevaluate(java.lang.Object document, java.lang.Object rootDocument, Configuration configuration)Evaluates this pathEvaluationContextevaluate(java.lang.Object document, java.lang.Object rootDocument, Configuration configuration, boolean forUpdate)Evaluates this pathRootPathTokengetRoot()booleanisDefinite()booleanisFunctionPath()booleanisRootPath()java.lang.StringtoString()
-
-
-
Constructor Detail
-
CompiledPath
public CompiledPath(RootPathToken root, boolean isRootPath)
-
-
Method Detail
-
isRootPath
public boolean isRootPath()
- Specified by:
isRootPathin 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:PathEvaluates this path- Specified by:
evaluatein 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:PathEvaluates this path
-
isDefinite
public boolean isDefinite()
- Specified by:
isDefinitein interfacePath- Returns:
- true id this path is definite
-
isFunctionPath
public boolean isFunctionPath()
- Specified by:
isFunctionPathin interfacePath- Returns:
- true id this path is a function
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getRoot
public RootPathToken getRoot()
-
-