public class JXPathExpression extends ExpressionSupport
Expression
supportConstructor and Description |
---|
JXPathExpression(java.lang.String expression,
java.lang.Class<?> type)
Creates a new JXPathExpression instance (lenient is disabled)
|
JXPathExpression(java.lang.String expression,
java.lang.Class<?> type,
boolean lenient)
Creates a new JXPathExpression instance
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
assertionFailureMessage(Exchange exchange) |
<T> T |
evaluate(Exchange exchange,
java.lang.Class<T> tClass)
Returns the value of the expression on the given exchange
|
boolean |
isLenient() |
void |
setLenient(boolean lenient) |
java.lang.String |
toString() |
assertMatches, evaluate, matches
public JXPathExpression(java.lang.String expression, java.lang.Class<?> type)
expression
- the JXPath expression to be evaluatedtype
- the expected result typepublic JXPathExpression(java.lang.String expression, java.lang.Class<?> type, boolean lenient)
expression
- the JXPath expression to be evaluatedtype
- the expected result typelenient
- to configure lenientpublic boolean isLenient()
public void setLenient(boolean lenient)
public <T> T evaluate(Exchange exchange, java.lang.Class<T> tClass)
Expression
exchange
- the message exchange on which to evaluate the expressiontClass
- the expected type of the evaluation resultprotected java.lang.String assertionFailureMessage(Exchange exchange)
assertionFailureMessage
in class ExpressionSupport
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2007-2014 Red Hat, Inc.. All Rights Reserved.