org.apache.camel.language.simple
Class SimpleLanguageSupport

java.lang.Object
  extended by org.apache.camel.language.simple.SimpleLanguageSupport
All Implemented Interfaces:
IsSingleton, Language
Direct Known Subclasses:
SimpleLanguage

public abstract class SimpleLanguageSupport
extends Object
implements Language, IsSingleton

Abstract base class for Simple languages.


Field Summary
protected static Pattern ANDOR_PATTERN
           
protected  org.slf4j.Logger log
           
protected static Pattern OPERATOR_PATTERN
           
protected static String OPERATOR_REGEX
           
protected static Pattern RANGE_PATTERN
           
protected static Pattern START_ANDOR_PATTERN
           
 
Constructor Summary
SimpleLanguageSupport()
           
 
Method Summary
protected  Expression createComplexConcatExpression(String expression)
           
protected  Expression createConstantExpression(String expression)
           
protected  Expression createConstantExpression(String expression, int start, int end)
           
 Expression createExpression(String expression)
          Creates an expression based on the given string input
 Predicate createPredicate(String expression)
          Creates a predicate based on the given string input
protected abstract  Expression createSimpleExpression(String expression, boolean strict)
          Creates the simple expression based on the extracted content from the ${ } place holders
protected  Expression createSimpleOrConstantExpression(String text)
           
protected  String ifStartsWithReturnRemainder(String prefix, String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.camel.IsSingleton
isSingleton
 

Field Detail

OPERATOR_REGEX

protected static final String OPERATOR_REGEX
See Also:
Constant Field Values

OPERATOR_PATTERN

protected static final Pattern OPERATOR_PATTERN

ANDOR_PATTERN

protected static final Pattern ANDOR_PATTERN

START_ANDOR_PATTERN

protected static final Pattern START_ANDOR_PATTERN

RANGE_PATTERN

protected static final Pattern RANGE_PATTERN

log

protected final org.slf4j.Logger log
Constructor Detail

SimpleLanguageSupport

public SimpleLanguageSupport()
Method Detail

createPredicate

public Predicate createPredicate(String expression)
Description copied from interface: Language
Creates a predicate based on the given string input

Specified by:
createPredicate in interface Language
Parameters:
expression - the expression
Returns:
the created predicate

createExpression

public Expression createExpression(String expression)
Description copied from interface: Language
Creates an expression based on the given string input

Specified by:
createExpression in interface Language
Parameters:
expression - the expression as a string input
Returns:
the created expression

createComplexConcatExpression

protected Expression createComplexConcatExpression(String expression)

createSimpleOrConstantExpression

protected Expression createSimpleOrConstantExpression(String text)

createConstantExpression

protected Expression createConstantExpression(String expression,
                                              int start,
                                              int end)

createConstantExpression

protected Expression createConstantExpression(String expression)

createSimpleExpression

protected abstract Expression createSimpleExpression(String expression,
                                                     boolean strict)
Creates the simple expression based on the extracted content from the ${ } place holders

Parameters:
expression - the content between ${ and }
strict - whether it is strict mode or not, if strict it will throw a ExpressionIllegalSyntaxException if the expression was not known. Set to false to support constant expressions
Returns:
the expression

ifStartsWithReturnRemainder

protected String ifStartsWithReturnRemainder(String prefix,
                                             String text)


Apache CAMEL