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 classFilterCompiler.CompiledFilter
-
Field Summary
Fields Modifier and Type Field Description private static charANDprivate static charARRAY_CLOSEprivate static charARRAY_OPENprivate static charBANGprivate static charCLOSE_BRACKETprivate static charDOC_CONTEXTprivate static charEQprivate static charEVAL_CONTEXTprivate static charFALSEprivate CharacterIndexfilterprivate static charGTprivate static org.slf4j.Loggerloggerprivate static charLTprivate static charMINUSprivate static charNULLprivate static charOBJECT_CLOSEprivate static charOBJECT_OPENprivate static charOPEN_BRACKETprivate static charOPEN_SQUARE_BRACKETprivate static charORprivate static charPATTERNprivate static charPERIODprivate static charSPACEprivate static charTICKprivate static charTILDEprivate static charTRUE
-
Constructor Summary
Constructors Modifier Constructor Description privateFilterCompiler(java.lang.String filterString)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Predicatecompile()static Filtercompile(java.lang.String filterString)private booleancurrentCharIsClosingFunctionBracket(int lowerBound)private booleanexpressionIsTerminated()private booleanisLogicalOperatorChar(char c)private booleanisRelationalOperatorChar(char c)private ValueNode.BooleanNodereadBooleanLiteral()private RelationalExpressionNodereadExpression()private ValueNode.JsonNodereadJsonLiteral()private ValueNodereadLiteral()private LogicalOperatorreadLogicalOperator()private ValueNode.NullNodereadNullLiteral()private ValueNode.NumberNodereadNumberLiteral()private ValueNode.PathNodereadPath()private ValueNode.PatternNodereadPattern()private RelationalOperatorreadRelationalOperator()private ValueNode.StringNodereadStringLiteral()private ValueNodereadValueNode()
-
-
-
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)
-
-