public class SimpleBuilder extends Object implements Predicate, Expression
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.Constructor and Description |
---|
SimpleBuilder(String text) |
Modifier and Type | Method and Description |
---|---|
<T> T |
evaluate(Exchange exchange,
Class<T> type)
Returns the value of the expression on the given exchange
|
Class<?> |
getResultType() |
String |
getText() |
boolean |
matches(Exchange exchange)
Evaluates the predicate on the message exchange and returns true if this
exchange matches the predicate
|
SimpleBuilder |
resultType(Class<?> resultType) |
void |
setResultType(Class<?> resultType) |
static SimpleBuilder |
simple(String text) |
static SimpleBuilder |
simple(String text,
Class<?> resultType) |
static SimpleBuilder |
simpleF(String formatText,
Class<?> resultType,
Object... values) |
static SimpleBuilder |
simpleF(String formatText,
Object... values) |
String |
toString() |
public SimpleBuilder(String text)
public static SimpleBuilder simple(String text)
public static SimpleBuilder simple(String text, Class<?> resultType)
public static SimpleBuilder simpleF(String formatText, Object... values)
public static SimpleBuilder simpleF(String formatText, Class<?> resultType, Object... values)
public Class<?> getResultType()
public void setResultType(Class<?> resultType)
public SimpleBuilder resultType(Class<?> resultType)
public boolean matches(Exchange exchange)
Predicate
public <T> T evaluate(Exchange exchange, Class<T> type)
Expression
evaluate
in interface Expression
exchange
- the message exchange on which to evaluate the expressiontype
- the expected type of the evaluation resultApache Camel