Class SimplePredicateParser


  • public class SimplePredicateParser
    extends BaseSimpleParser
    A parser to parse simple language as a Camel Predicate
    • Constructor Detail

      • SimplePredicateParser

        public SimplePredicateParser​(org.apache.camel.CamelContext camelContext,
                                     String expression,
                                     boolean allowEscape,
                                     Map<String,​org.apache.camel.Expression> cacheExpression)
    • 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()