Package org.apache.camel.language.simple
Class SimplePredicateParser
java.lang.Object
org.apache.camel.language.simple.BaseSimpleParser
org.apache.camel.language.simple.SimplePredicateParser
A parser to parse simple language as a Camel
Predicate-
Field Summary
Fields inherited from class org.apache.camel.language.simple.BaseSimpleParser
allowEscape, camelContext, CODE_END, CODE_START, expression, index, nodes, previousIndex, token, tokens -
Constructor Summary
ConstructorsConstructorDescriptionSimplePredicateParser(org.apache.camel.CamelContext camelContext, String expression, boolean allowEscape, Map<String, org.apache.camel.Expression> cacheExpression) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected booleanprotected StringSecond step parsing into codeprotected org.apache.camel.PredicateSecond step parsing into a predicateprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanorg.apache.camel.PredicateFirst step parsing into a list of nodes.protected voidParses the tokens and crates the AST nodes.protected booleanprotected booleanprotected booleanMethods inherited from class org.apache.camel.language.simple.BaseSimpleParser
accept, clear, expect, expectAndAcceptMore, nextToken, nextToken, prepareBlocks, prepareUnaryExpressions
-
Constructor Details
-
SimplePredicateParser
-
-
Method Details
-
parsePredicate
public org.apache.camel.Predicate parsePredicate() -
parseCode
-
parseTokens
First step parsing into a list of nodes. This is used as SPI for camel-csimple to do AST transformation and parse into java source code. -
doParsePredicate
protected org.apache.camel.Predicate doParsePredicate()Second step parsing into a predicate -
doParseCode
Second step parsing into code -
parseTokensAndCreateNodes
protected void parseTokensAndCreateNodes()Parses the tokens and crates the AST nodes. After the initial parsing of the input (input -> tokens) then we parse again (tokens -> ast). In this parsing the balance of the blocks is checked, so that each block has a matching start and end token. For example a single quote block, or a function block etc. -
isBooleanValue
protected boolean isBooleanValue() -
singleQuotedLiteralWithFunctionsText
protected boolean singleQuotedLiteralWithFunctionsText() -
singleQuotedLiteralText
protected boolean singleQuotedLiteralText() -
doubleQuotedLiteralWithFunctionsText
protected boolean doubleQuotedLiteralWithFunctionsText() -
doubleQuotedLiteralText
protected boolean doubleQuotedLiteralText() -
functionText
protected boolean functionText() -
unaryOperator
protected boolean unaryOperator() -
binaryOperator
protected boolean binaryOperator() -
logicalOperator
protected boolean logicalOperator() -
numericValue
protected boolean numericValue() -
booleanValue
protected boolean booleanValue() -
nullValue
protected boolean nullValue() -
minusValue
protected boolean minusValue()
-