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:
FileLanguage, SimpleLanguage

public abstract class SimpleLanguageSupport
extends Object
implements Language, IsSingleton

Abstract base class for Simple languages.


Field Summary
protected static String GROUP_PATTERN
           
protected  org.apache.commons.logging.Log log
           
protected static Pattern PATTERN
           
protected static Pattern RANGE_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

GROUP_PATTERN

protected static final String GROUP_PATTERN
See Also:
Constant Field Values

PATTERN

protected static final Pattern PATTERN

RANGE_PATTERN

protected static final Pattern RANGE_PATTERN

log

protected final org.apache.commons.logging.Log 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