Class ArrayPathToken
java.lang.Object
com.jayway.jsonpath.internal.path.PathToken
com.jayway.jsonpath.internal.path.ArrayPathToken
-
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckArrayModel(String currentPath, Object model, EvaluationContextImpl ctx) Check if model is non-null and array.voidevaluate(String currentPath, PathRef parent, Object model, EvaluationContextImpl ctx) voidevaluateIndexOperation(String currentPath, PathRef parent, Object model, EvaluationContextImpl ctx) voidevaluateSliceOperation(String currentPath, PathRef parent, Object model, EvaluationContextImpl ctx) booleanvoidsliceBetween(ArraySliceOperation operation, String currentPath, PathRef parent, Object model, EvaluationContextImpl ctx) voidsliceFrom(ArraySliceOperation operation, String currentPath, PathRef parent, Object model, EvaluationContextImpl ctx) voidsliceTo(ArraySliceOperation operation, String currentPath, PathRef parent, Object model, EvaluationContextImpl ctx) Methods inherited from class PathToken
equals, getTokenCount, handleArrayIndex, hashCode, invoke, isPathDefinite, toString
-
Method Details
-
evaluate
-
evaluateIndexOperation
public void evaluateIndexOperation(String currentPath, PathRef parent, Object model, EvaluationContextImpl ctx) -
evaluateSliceOperation
public void evaluateSliceOperation(String currentPath, PathRef parent, Object model, EvaluationContextImpl ctx) -
sliceFrom
public void sliceFrom(ArraySliceOperation operation, String currentPath, PathRef parent, Object model, EvaluationContextImpl ctx) -
sliceBetween
public void sliceBetween(ArraySliceOperation operation, String currentPath, PathRef parent, Object model, EvaluationContextImpl ctx) -
sliceTo
public void sliceTo(ArraySliceOperation operation, String currentPath, PathRef parent, Object model, EvaluationContextImpl ctx) -
getPathFragment
- Specified by:
getPathFragmentin classPathToken
-
isTokenDefinite
public boolean isTokenDefinite()- Specified by:
isTokenDefinitein classPathToken
-
checkArrayModel
Check if model is non-null and array.- Parameters:
currentPath-model-ctx-- Returns:
- false if current evaluation call must be skipped, true otherwise
- Throws:
PathNotFoundException- if model is null and evaluation must be interruptedInvalidPathException- if model is not an array and evaluation must be interrupted
-