Utility class to help with the evaluation of JSTL Expression Language. It mainly encapsulates the calls to
ExpressionEvaluationManager to ease the use of this class.
| Method from org.displaytag.tags.el.ExpressionEvaluator Detail: |
public Object eval(String attrName,
String attrValue,
Class returnClass) throws JspException {
return attrValue != null ? ExpressionEvaluatorManager.evaluate(
attrName,
attrValue,
returnClass,
this.tag,
this.pageContext) : null;
}
Evaluate expression in attrValue. |
public boolean evalBoolean(String attrName,
String attrValue) throws JspException {
return BooleanUtils.toBoolean((Boolean) eval(attrName, attrValue, Boolean.class));
}
Evaluate expression in attrValueas as a boolean. |
public int evalInt(String attrName,
String attrValue) throws JspException {
Integer rtn = (Integer) eval(attrName, attrValue, Integer.class);
if (rtn != null)
{
return rtn.intValue();
}
return -1;
}
Evaluate expression in attrValueas as a int. |
public long evalLong(String attrName,
String attrValue) throws JspException {
Long rtn = (Long) eval(attrName, attrValue, Long.class);
if (rtn != null)
{
return rtn.longValue();
}
return -1L;
}
Evaluate expression in attrValueas as a long. |
public String evalString(String attrName,
String attrValue) throws JspException {
return (String) eval(attrName, attrValue, String.class);
}
Evaluate expression in attrValueas as a String. |