Class PathToken
- java.lang.Object
-
- com.jayway.jsonpath.internal.path.PathToken
-
- Direct Known Subclasses:
ArrayPathToken
,FunctionPathToken
,PredicatePathToken
,PropertyPathToken
,RootPathToken
,ScanPathToken
,WildcardPathToken
public abstract class PathToken extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description PathToken()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) PathToken
appendTailToken(PathToken next)
boolean
equals(java.lang.Object obj)
abstract void
evaluate(java.lang.String currentPath, PathRef parent, java.lang.Object model, EvaluationContextImpl ctx)
protected abstract java.lang.String
getPathFragment()
int
getTokenCount()
protected void
handleArrayIndex(int index, java.lang.String currentPath, java.lang.Object model, EvaluationContextImpl ctx)
(package private) void
handleObjectProperty(java.lang.String currentPath, java.lang.Object model, EvaluationContextImpl ctx, java.util.List<java.lang.String> properties)
int
hashCode()
private static boolean
hasProperty(java.lang.String property, java.lang.Object model, EvaluationContextImpl ctx)
void
invoke(PathFunction pathFunction, java.lang.String currentPath, PathRef parent, java.lang.Object model, EvaluationContextImpl ctx)
(package private) boolean
isLeaf()
boolean
isPathDefinite()
(package private) boolean
isRoot()
abstract boolean
isTokenDefinite()
(package private) boolean
isUpstreamDefinite()
(package private) PathToken
next()
(package private) PathToken
prev()
private static java.lang.Object
readObjectProperty(java.lang.String property, java.lang.Object model, EvaluationContextImpl ctx)
java.lang.String
toString()
-
-
-
Method Detail
-
handleObjectProperty
void handleObjectProperty(java.lang.String currentPath, java.lang.Object model, EvaluationContextImpl ctx, java.util.List<java.lang.String> properties)
-
hasProperty
private static boolean hasProperty(java.lang.String property, java.lang.Object model, EvaluationContextImpl ctx)
-
readObjectProperty
private static java.lang.Object readObjectProperty(java.lang.String property, java.lang.Object model, EvaluationContextImpl ctx)
-
handleArrayIndex
protected void handleArrayIndex(int index, java.lang.String currentPath, java.lang.Object model, EvaluationContextImpl ctx)
-
prev
PathToken prev()
-
next
PathToken next()
-
isLeaf
boolean isLeaf()
-
isRoot
boolean isRoot()
-
isUpstreamDefinite
boolean isUpstreamDefinite()
-
getTokenCount
public int getTokenCount()
-
isPathDefinite
public boolean isPathDefinite()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
invoke
public void invoke(PathFunction pathFunction, java.lang.String currentPath, PathRef parent, java.lang.Object model, EvaluationContextImpl ctx)
-
evaluate
public abstract void evaluate(java.lang.String currentPath, PathRef parent, java.lang.Object model, EvaluationContextImpl ctx)
-
isTokenDefinite
public abstract boolean isTokenDefinite()
-
getPathFragment
protected abstract java.lang.String getPathFragment()
-
-