|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.camel.model.language.ExpressionDefinition
public class ExpressionDefinition
A useful base class for an expression
Constructor Summary | |
---|---|
ExpressionDefinition()
|
|
ExpressionDefinition(Expression expression)
|
|
ExpressionDefinition(Predicate predicate)
|
|
ExpressionDefinition(String expression)
|
Method Summary | ||
---|---|---|
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)
|
|
|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ExpressionDefinition()
public ExpressionDefinition(String expression)
public ExpressionDefinition(Predicate predicate)
public ExpressionDefinition(Expression expression)
Method Detail |
---|
public static String getLabel(List<ExpressionDefinition> expressions)
public String toString()
toString
in class Object
public Object evaluate(Exchange exchange)
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 result
public void assertMatches(String text, Exchange exchange) throws AssertionError
AssertionError
public boolean matches(Exchange exchange)
Predicate
matches
in interface Predicate
exchange
- the message exchange
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 String getId()
public void setId(String value)
public Predicate getPredicate()
public Expression getExpressionValue()
protected void setExpressionValue(Expression expressionValue)
public ExpressionDefinition getExpressionType()
public Boolean getTrim()
public void setTrim(Boolean trim)
public boolean isTrim()
public String getLabel()
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |