Class ArrayPathToken
java.lang.Object
com.jayway.jsonpath.internal.path.PathToken
com.jayway.jsonpath.internal.path.ArrayPathToken
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ArrayIndexOperation
private final ArraySliceOperation
private static final org.slf4j.Logger
-
Constructor Summary
ConstructorsConstructorDescriptionArrayPathToken
(ArrayIndexOperation arrayIndexOperation) ArrayPathToken
(ArraySliceOperation arraySliceOperation) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
checkArrayModel
(String currentPath, Object model, EvaluationContextImpl ctx) Check if model is non-null and array.void
evaluate
(String currentPath, PathRef parent, Object model, EvaluationContextImpl ctx) void
evaluateIndexOperation
(String currentPath, PathRef parent, Object model, EvaluationContextImpl ctx) void
evaluateSliceOperation
(String currentPath, PathRef parent, Object model, EvaluationContextImpl ctx) boolean
void
sliceBetween
(ArraySliceOperation operation, String currentPath, PathRef parent, Object model, EvaluationContextImpl ctx) void
sliceFrom
(ArraySliceOperation operation, String currentPath, PathRef parent, Object model, EvaluationContextImpl ctx) void
sliceTo
(ArraySliceOperation operation, String currentPath, PathRef parent, Object model, EvaluationContextImpl ctx) Methods inherited from class com.jayway.jsonpath.internal.path.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:
getPathFragment
in classPathToken
-
isTokenDefinite
public boolean isTokenDefinite()- Specified by:
isTokenDefinite
in 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
-