public class ExpressionDefinition extends Object implements Expression, Predicate
Constructor and Description |
---|
ExpressionDefinition() |
ExpressionDefinition(Expression expression) |
ExpressionDefinition(Predicate predicate) |
ExpressionDefinition(String expression) |
Modifier and Type | Method and Description |
---|---|
void |
assertMatches(String text,
Exchange exchange) |
protected void |
configureExpression(CamelContext camelContext,
Expression expression) |
protected void |
configurePredicate(CamelContext camelContext,
Predicate predicate) |
Expression |
createExpression(CamelContext camelContext) |
Expression |
createExpression(RouteContext routeContext) |
Predicate |
createPredicate(CamelContext camelContext) |
Predicate |
createPredicate(RouteContext routeContext) |
Object |
evaluate(Exchange exchange) |
<T> T |
evaluate(Exchange exchange,
Class<T> type)
Returns the value of the expression on the given exchange
|
String |
getExpression() |
ExpressionDefinition |
getExpressionType() |
Expression |
getExpressionValue() |
String |
getId()
Gets the value of the id property.
|
String |
getLabel()
Returns some descriptive text to describe this node
|
static String |
getLabel(List<ExpressionDefinition> expressions) |
String |
getLanguage() |
Predicate |
getPredicate() |
Boolean |
getTrim() |
boolean |
isTrim() |
boolean |
matches(Exchange exchange)
Evaluates the predicate on the message exchange and returns true if this
exchange matches the predicate
|
void |
setExpression(String expression) |
protected void |
setExpressionType(ExpressionDefinition expressionType)
Allows derived classes to set a lazily created expressionType instance
such as if using the
ExpressionClause |
protected void |
setExpressionValue(Expression expressionValue) |
void |
setId(String value)
Sets the value of the id property.
|
protected void |
setProperty(Object bean,
String name,
Object value)
Sets a named property on the object instance using introspection
|
void |
setTrim(Boolean trim) |
String |
toString() |
public ExpressionDefinition()
public ExpressionDefinition(String expression)
public ExpressionDefinition(Predicate predicate)
public ExpressionDefinition(Expression expression)
public static String getLabel(List<ExpressionDefinition> expressions)
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 resultpublic void assertMatches(String text, Exchange exchange) throws AssertionError
AssertionError
public boolean matches(Exchange exchange)
Predicate
public String getLanguage()
public final Predicate createPredicate(RouteContext routeContext)
public Predicate createPredicate(CamelContext camelContext)
public final Expression createExpression(RouteContext routeContext)
public Expression createExpression(CamelContext camelContext)
public String getExpression()
@Required public void setExpression(String expression)
public Predicate getPredicate()
public Expression getExpressionValue()
protected void setExpressionValue(Expression expressionValue)
public ExpressionDefinition getExpressionType()
public boolean isTrim()
protected void setExpressionType(ExpressionDefinition expressionType)
ExpressionClause
protected void configurePredicate(CamelContext camelContext, Predicate predicate)
protected void configureExpression(CamelContext camelContext, Expression expression)
protected void setProperty(Object bean, String name, Object value)
Apache Camel