Package org.apache.camel.language.simple
Class SimpleTokenizer
java.lang.Object
org.apache.camel.language.simple.SimpleTokenizer
Tokenizer to create
SimpleToken from the input.-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanhasEscapeToken(String expression) Does the expression include an escape tokens.static booleanhasFunctionStartToken(String expression) Does the expression include a simple function.static SimpleTokenCreate the next tokenstatic SimpleTokenCreate the next token
-
Method Details
-
hasFunctionStartToken
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
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 expressionindex- the current indexallowEscape- whether to allow escapesfilter- defines the accepted token types to be returned (character is always used as fallback)- Returns:
- the created token, will always return a token
-
nextToken
Create the next token- Parameters:
expression- the input expressionindex- the current indexallowEscape- whether to allow escapes- Returns:
- the created token, will always return a token
-