Package org.apache.camel.language.simple
Class SimpleTokenizer
- java.lang.Object
-
- org.apache.camel.language.simple.SimpleTokenizer
-
public final class SimpleTokenizer extends Object
Tokenizer to createSimpleToken
from the input.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
hasFunctionStartToken(String expression)
Does the expression include a simple function.static SimpleToken
nextToken(String expression, int index, boolean allowEscape)
Create the next tokenstatic SimpleToken
nextToken(String expression, int index, boolean allowEscape, TokenType... filter)
Create the next token
-
-
-
Method Detail
-
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
-
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
public static SimpleToken nextToken(String expression, int index, boolean allowEscape)
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
-
-