Class ArrayPathToken
java.lang.Object
com.jayway.jsonpath.internal.path.PathToken
com.jayway.jsonpath.internal.path.ArrayPathToken
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ArrayIndexOperationprivate final ArraySliceOperationprivate static final org.slf4j.Logger -
Constructor Summary
ConstructorsConstructorDescriptionArrayPathToken(ArrayIndexOperation arrayIndexOperation) ArrayPathToken(ArraySliceOperation arraySliceOperation) -
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
appendTailToken, equals, getTokenCount, handleArrayIndex, handleObjectProperty, hashCode, invoke, isLeaf, isPathDefinite, isRoot, isUpstreamDefinite, next, prev, toString
-
Field Details
-
logger
private static final org.slf4j.Logger logger -
arraySliceOperation
-
arrayIndexOperation
-
-
Constructor Details
-
ArrayPathToken
ArrayPathToken(ArraySliceOperation arraySliceOperation) -
ArrayPathToken
ArrayPathToken(ArrayIndexOperation arrayIndexOperation)
-
-
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
-