Package org.apache.camel.language.simple
Class SimplePredicateParser
- java.lang.Object
-
- org.apache.camel.language.simple.BaseSimpleParser
-
- org.apache.camel.language.simple.SimplePredicateParser
-
public class SimplePredicateParser extends BaseSimpleParser
A parser to parse simple language as a CamelPredicate
-
-
Field Summary
-
Fields inherited from class org.apache.camel.language.simple.BaseSimpleParser
allowEscape, camelContext, expression, index, nodes, previousIndex, token, tokens
-
-
Constructor Summary
Constructors Constructor Description SimplePredicateParser(org.apache.camel.CamelContext camelContext, String expression, boolean allowEscape, Map<String,org.apache.camel.Expression> cacheExpression)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
binaryOperator()
protected boolean
booleanValue()
protected String
doParseCode()
Second step parsing into codeprotected org.apache.camel.Predicate
doParsePredicate()
Second step parsing into a predicateprotected boolean
doubleQuotedLiteralText()
protected boolean
doubleQuotedLiteralWithFunctionsText()
protected boolean
functionText()
protected boolean
isBooleanValue()
protected boolean
logicalOperator()
protected boolean
minusValue()
protected boolean
nullValue()
protected boolean
numericValue()
String
parseCode()
org.apache.camel.Predicate
parsePredicate()
List<SimpleNode>
parseTokens()
First step parsing into a list of nodes.protected void
parseTokensAndCreateNodes()
Parses the tokens and crates the AST nodes.protected boolean
singleQuotedLiteralText()
protected boolean
singleQuotedLiteralWithFunctionsText()
protected boolean
unaryOperator()
-
Methods inherited from class org.apache.camel.language.simple.BaseSimpleParser
accept, clear, expect, expectAndAcceptMore, nextToken, nextToken, prepareBlocks, prepareUnaryExpressions
-
-
-
-
Method Detail
-
parsePredicate
public org.apache.camel.Predicate parsePredicate()
-
parseCode
public String parseCode()
-
parseTokens
public List<SimpleNode> 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
protected String 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()
-
-