|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.model.language.ExpressionType
public class ExpressionType
A useful base class for an expression
Constructor Summary | |
---|---|
ExpressionType()
|
|
ExpressionType(Expression expression)
|
|
ExpressionType(Predicate predicate)
|
|
ExpressionType(String expression)
|
Method Summary | |
---|---|
void |
assertMatches(String text,
Exchange exchange)
Allows this predicate to be used nicely in testing to generate a nicely formatted exception and message if this predicate does not match for the given exchange. |
protected void |
configureExpression(RouteContext routeContext,
Expression expression)
|
protected void |
configurePredicate(RouteContext routeContext,
Predicate predicate)
|
Expression |
createExpression(RouteContext routeContext)
|
Predicate<Exchange> |
createPredicate(RouteContext routeContext)
|
Object |
evaluate(Exchange exchange)
Returns the value of the expression on the given exchange |
String |
getExpression()
|
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<ExpressionType> expressions)
|
String |
getLanguage()
|
Predicate |
getPredicate()
|
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(ExpressionType 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 |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ExpressionType()
public ExpressionType(String expression)
public ExpressionType(Predicate predicate)
public ExpressionType(Expression expression)
Method Detail |
---|
public static String getLabel(List<ExpressionType> expressions)
public String toString()
toString
in class Object
public Object evaluate(Exchange exchange)
Expression
evaluate
in interface Expression<Exchange>
exchange
- the message exchange on which to evaluate the expression
public void assertMatches(String text, Exchange exchange) throws AssertionError
Predicate
assertMatches
in interface Predicate<Exchange>
text
- the description to use in the exception messageexchange
- the exchange to evaluate the expression on
AssertionError
- if the predicate does not matchpublic boolean matches(Exchange exchange)
Predicate
matches
in interface Predicate<Exchange>
exchange
- the message exchange
public String getLanguage()
public Predicate<Exchange> createPredicate(RouteContext routeContext)
public Expression createExpression(RouteContext routeContext)
public String getExpression()
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 String getLabel()
protected void setExpressionType(ExpressionType expressionType)
ExpressionClause
protected void configurePredicate(RouteContext routeContext, Predicate predicate)
protected void configureExpression(RouteContext routeContext, 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 |