Class SimpleTokenizer

java.lang.Object
org.apache.camel.language.simple.SimpleTokenizer

public final class SimpleTokenizer extends Object
Tokenizer to create SimpleToken from the input.
  • Method Details

    • hasFunctionStartToken

      public static boolean hasFunctionStartToken(String expression)
      Does the expression include a simple function.
      Parameters:
      expression - the expression
      Returns:
      true if one or more simple function is included in the expression
    • hasEscapeToken

      public static boolean hasEscapeToken(String expression)
      Does the expression include an escape tokens.
      Parameters:
      expression - the expression
      Returns:
      true if one or more escape tokens is included in the expression
    • nextToken

      public static SimpleToken nextToken(String expression, int index, boolean allowEscape, TokenType... filter)
      Create the next token
      Parameters:
      expression - the input expression
      index - the current index
      allowEscape - whether to allow escapes
      filter - defines the accepted token types to be returned (character is always used as fallback)
      Returns:
      the created token, will always return a token
    • nextToken

      public static SimpleToken nextToken(String expression, int index, boolean allowEscape)
      Create the next token
      Parameters:
      expression - the input expression
      index - the current index
      allowEscape - whether to allow escapes
      Returns:
      the created token, will always return a token