public java.lang.String | evaluate(java.lang.Object pContext, VariableResolver pResolver, java.util.Map functions, java.lang.String defaultPrefix, Logger pLogger)Evaluates the expression string by evaluating each element,
converting it to a String (using toString, or "" for null values)
and concatenating the results into a single String.
StringBuffer buf = new StringBuffer ();
for (int i = 0; i < mElements.length; i++) {
Object elem = mElements [i];
if (elem instanceof String) {
buf.append ((String) elem);
}
else if (elem instanceof Expression) {
Object val =
((Expression) elem).evaluate (pContext,
pResolver,
functions,
defaultPrefix,
pLogger);
if (val != null) {
buf.append (val.toString ());
}
}
}
return buf.toString ();
|