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 Expressions or Predicates 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)
Predicatepublic <T> T evaluate(Exchange exchange, Class<T> type)
Expressionevaluate in interface Expressionexchange - the message exchange on which to evaluate the expressiontype - the expected type of the evaluation resultApache Camel