Class ArrayPathToken
- java.lang.Object
-
- com.jayway.jsonpath.internal.path.PathToken
-
- com.jayway.jsonpath.internal.path.ArrayPathToken
-
public class ArrayPathToken extends PathToken
-
-
Field Summary
Fields Modifier and Type Field Description private ArrayIndexOperationarrayIndexOperationprivate ArraySliceOperationarraySliceOperationprivate static org.slf4j.Loggerlogger
-
Constructor Summary
Constructors Constructor Description ArrayPathToken(ArrayIndexOperation arrayIndexOperation)ArrayPathToken(ArraySliceOperation arraySliceOperation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancheckArrayModel(java.lang.String currentPath, java.lang.Object model, EvaluationContextImpl ctx)Check if model is non-null and array.voidevaluate(java.lang.String currentPath, PathRef parent, java.lang.Object model, EvaluationContextImpl ctx)voidevaluateIndexOperation(java.lang.String currentPath, PathRef parent, java.lang.Object model, EvaluationContextImpl ctx)voidevaluateSliceOperation(java.lang.String currentPath, PathRef parent, java.lang.Object model, EvaluationContextImpl ctx)java.lang.StringgetPathFragment()booleanisTokenDefinite()voidsliceBetween(ArraySliceOperation operation, java.lang.String currentPath, PathRef parent, java.lang.Object model, EvaluationContextImpl ctx)voidsliceFrom(ArraySliceOperation operation, java.lang.String currentPath, PathRef parent, java.lang.Object model, EvaluationContextImpl ctx)voidsliceTo(ArraySliceOperation operation, java.lang.String currentPath, PathRef parent, java.lang.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 Detail
-
logger
private static final org.slf4j.Logger logger
-
arraySliceOperation
private final ArraySliceOperation arraySliceOperation
-
arrayIndexOperation
private final ArrayIndexOperation arrayIndexOperation
-
-
Constructor Detail
-
ArrayPathToken
ArrayPathToken(ArraySliceOperation arraySliceOperation)
-
ArrayPathToken
ArrayPathToken(ArrayIndexOperation arrayIndexOperation)
-
-
Method Detail
-
evaluate
public void evaluate(java.lang.String currentPath, PathRef parent, java.lang.Object model, EvaluationContextImpl ctx)
-
evaluateIndexOperation
public void evaluateIndexOperation(java.lang.String currentPath, PathRef parent, java.lang.Object model, EvaluationContextImpl ctx)
-
evaluateSliceOperation
public void evaluateSliceOperation(java.lang.String currentPath, PathRef parent, java.lang.Object model, EvaluationContextImpl ctx)
-
sliceFrom
public void sliceFrom(ArraySliceOperation operation, java.lang.String currentPath, PathRef parent, java.lang.Object model, EvaluationContextImpl ctx)
-
sliceBetween
public void sliceBetween(ArraySliceOperation operation, java.lang.String currentPath, PathRef parent, java.lang.Object model, EvaluationContextImpl ctx)
-
sliceTo
public void sliceTo(ArraySliceOperation operation, java.lang.String currentPath, PathRef parent, java.lang.Object model, EvaluationContextImpl ctx)
-
getPathFragment
public java.lang.String getPathFragment()
- Specified by:
getPathFragmentin classPathToken
-
isTokenDefinite
public boolean isTokenDefinite()
- Specified by:
isTokenDefinitein classPathToken
-
checkArrayModel
protected boolean checkArrayModel(java.lang.String currentPath, java.lang.Object model, EvaluationContextImpl ctx)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
-
-