public Object evaluate(Exchange exchange) {
Language lan = exchange.getContext().resolveLanguage(language);
if (lan != null) {
return lan.createExpression(expression).evaluate(exchange, Object.class);
} else {
throw new NoSuchLanguageException(language);
}
}
@Override
public boolean matches(Exchange exchange) {
Language lan = exchange.getContext().resolveLanguage(language);
if (lan != null) {
return lan.createPredicate(expression).matches(exchange);
} else {
throw new NoSuchLanguageException(language);
}
}
@Override
public String toString() {