Class FilterCompiler
- java.lang.Object
-
- com.jayway.jsonpath.internal.filter.FilterCompiler
-
public class FilterCompiler extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
FilterCompiler.CompiledFilter
-
Field Summary
Fields Modifier and Type Field Description private static char
AND
private static char
ARRAY_CLOSE
private static char
ARRAY_OPEN
private static char
BANG
private static char
CLOSE_BRACKET
private static char
DOC_CONTEXT
private static char
EQ
private static char
EVAL_CONTEXT
private static char
FALSE
private CharacterIndex
filter
private static char
GT
private static org.slf4j.Logger
logger
private static char
LT
private static char
MINUS
private static char
NULL
private static char
OBJECT_CLOSE
private static char
OBJECT_OPEN
private static char
OPEN_BRACKET
private static char
OPEN_SQUARE_BRACKET
private static char
OR
private static char
PATTERN
private static char
PERIOD
private static char
SPACE
private static char
TICK
private static char
TILDE
private static char
TRUE
-
Constructor Summary
Constructors Modifier Constructor Description private
FilterCompiler(java.lang.String filterString)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Predicate
compile()
static Filter
compile(java.lang.String filterString)
private boolean
currentCharIsClosingFunctionBracket(int lowerBound)
private boolean
expressionIsTerminated()
private boolean
isLogicalOperatorChar(char c)
private boolean
isRelationalOperatorChar(char c)
private ValueNode.BooleanNode
readBooleanLiteral()
private RelationalExpressionNode
readExpression()
private ValueNode.JsonNode
readJsonLiteral()
private ValueNode
readLiteral()
private LogicalOperator
readLogicalOperator()
private ValueNode.NullNode
readNullLiteral()
private ValueNode.NumberNode
readNumberLiteral()
private ValueNode.PathNode
readPath()
private ValueNode.PatternNode
readPattern()
private RelationalOperator
readRelationalOperator()
private ValueNode.StringNode
readStringLiteral()
private ValueNode
readValueNode()
-
-
-
Field Detail
-
logger
private static final org.slf4j.Logger logger
-
DOC_CONTEXT
private static final char DOC_CONTEXT
- See Also:
- Constant Field Values
-
EVAL_CONTEXT
private static final char EVAL_CONTEXT
- See Also:
- Constant Field Values
-
OPEN_SQUARE_BRACKET
private static final char OPEN_SQUARE_BRACKET
- See Also:
- Constant Field Values
-
OPEN_BRACKET
private static final char OPEN_BRACKET
- See Also:
- Constant Field Values
-
CLOSE_BRACKET
private static final char CLOSE_BRACKET
- See Also:
- Constant Field Values
-
SPACE
private static final char SPACE
- See Also:
- Constant Field Values
-
MINUS
private static final char MINUS
- See Also:
- Constant Field Values
-
TICK
private static final char TICK
- See Also:
- Constant Field Values
-
PERIOD
private static final char PERIOD
- See Also:
- Constant Field Values
-
LT
private static final char LT
- See Also:
- Constant Field Values
-
GT
private static final char GT
- See Also:
- Constant Field Values
-
EQ
private static final char EQ
- See Also:
- Constant Field Values
-
TILDE
private static final char TILDE
- See Also:
- Constant Field Values
-
TRUE
private static final char TRUE
- See Also:
- Constant Field Values
-
FALSE
private static final char FALSE
- See Also:
- Constant Field Values
-
NULL
private static final char NULL
- See Also:
- Constant Field Values
-
AND
private static final char AND
- See Also:
- Constant Field Values
-
OR
private static final char OR
- See Also:
- Constant Field Values
-
OBJECT_OPEN
private static final char OBJECT_OPEN
- See Also:
- Constant Field Values
-
OBJECT_CLOSE
private static final char OBJECT_CLOSE
- See Also:
- Constant Field Values
-
ARRAY_OPEN
private static final char ARRAY_OPEN
- See Also:
- Constant Field Values
-
ARRAY_CLOSE
private static final char ARRAY_CLOSE
- See Also:
- Constant Field Values
-
BANG
private static final char BANG
- See Also:
- Constant Field Values
-
PATTERN
private static final char PATTERN
- See Also:
- Constant Field Values
-
filter
private CharacterIndex filter
-
-
Method Detail
-
compile
public static Filter compile(java.lang.String filterString)
-
compile
public Predicate compile()
-
readValueNode
private ValueNode readValueNode()
-
readLiteral
private ValueNode readLiteral()
-
readExpression
private RelationalExpressionNode readExpression()
-
readLogicalOperator
private LogicalOperator readLogicalOperator()
-
readRelationalOperator
private RelationalOperator readRelationalOperator()
-
readNullLiteral
private ValueNode.NullNode readNullLiteral()
-
readJsonLiteral
private ValueNode.JsonNode readJsonLiteral()
-
readPattern
private ValueNode.PatternNode readPattern()
-
readStringLiteral
private ValueNode.StringNode readStringLiteral()
-
readNumberLiteral
private ValueNode.NumberNode readNumberLiteral()
-
readBooleanLiteral
private ValueNode.BooleanNode readBooleanLiteral()
-
readPath
private ValueNode.PathNode readPath()
-
expressionIsTerminated
private boolean expressionIsTerminated()
-
currentCharIsClosingFunctionBracket
private boolean currentCharIsClosingFunctionBracket(int lowerBound)
-
isLogicalOperatorChar
private boolean isLogicalOperatorChar(char c)
-
isRelationalOperatorChar
private boolean isRelationalOperatorChar(char c)
-
-