org.apache.camel.builder
Class SimpleBuilder
java.lang.Object
org.apache.camel.builder.SimpleBuilder
- All Implemented Interfaces:
- Expression, Predicate
public class SimpleBuilder
- extends Object
- implements Predicate, Expression
Creates an Simple
language builder.
This builder is available in the Java DSL from the RouteBuilder
which means that using
simple language for Expression
s or Predicate
s is very easy with the help of this builder.
- Version:
SimpleBuilder
public SimpleBuilder(String text)
simple
public static SimpleBuilder simple(String text)
simple
public static SimpleBuilder simple(String text,
Class<?> resultType)
getText
public String getText()
getResultType
public Class<?> getResultType()
setResultType
public void setResultType(Class<?> resultType)
resultType
public SimpleBuilder resultType(Class<?> resultType)
matches
public boolean matches(Exchange exchange)
- Description copied from interface:
Predicate
- Evaluates the predicate on the message exchange and returns true if this
exchange matches the predicate
- Specified by:
matches
in interface Predicate
- Parameters:
exchange
- the message exchange
- Returns:
- true if the predicate matches
evaluate
public <T> T evaluate(Exchange exchange,
Class<T> type)
- Description copied from interface:
Expression
- Returns the value of the expression on the given exchange
- Specified by:
evaluate
in interface Expression
- Parameters:
exchange
- the message exchange on which to evaluate the expressiontype
- the expected type of the evaluation result
- Returns:
- the value of the expression
toString
public String toString()
- Overrides:
toString
in class Object
Apache CAMEL