public interface Expression
Expression
represents an arbitrary expression using some pluggable
expression language.
Modifier and Type | Field and Description |
---|---|
static Expression |
NULL
Singleton instance that represents the expression that evaluates to null.
|
Modifier and Type | Method and Description |
---|---|
Object |
evaluate(JellyContext context)
Evaluates the expression with the given context
and returns the result
|
boolean |
evaluateAsBoolean(JellyContext context)
Evaluates the expression with the given context
coercing the result to be a boolean.
|
Iterator |
evaluateAsIterator(JellyContext context)
Evaluates the expression with the given context
coercing the result to be an Iterator.
|
String |
evaluateAsString(JellyContext context)
Evaluates the expression with the given context
coercing the result to be a String.
|
Object |
evaluateRecurse(JellyContext context)
This method evaluates the expression until a value (a non-Expression) object
is returned.
|
String |
getExpressionText() |
static final Expression NULL
String getExpressionText()
Object evaluate(JellyContext context)
String evaluateAsString(JellyContext context)
boolean evaluateAsBoolean(JellyContext context)
Iterator evaluateAsIterator(JellyContext context)
Object evaluateRecurse(JellyContext context)
Sometimes when Jelly is used inside Maven the value of an expression can actually be another expression. For example if a properties file is read, the values of variables can actually be expressions themselves.
e.g. ${foo.bar} can lookup "foo.bar" in a Maven context which could actually be another expression.
So using this method, nested expressions can be evaluated to the actual underlying value object.
Copyright © 2014 Apache Software Foundation. All rights reserved.