Class Evaluator
- java.lang.Object
-
- org.apache.taglibs.standard.lang.jstl.Evaluator
-
- All Implemented Interfaces:
ExpressionEvaluator
public class Evaluator extends java.lang.Object implements ExpressionEvaluator
This is the expression evaluator "adapter" that customizes it for use with the JSP Standard Tag Library. It uses a VariableResolver implementation that looks up variables from the PageContext and also implements its implicit objects. It also wraps ELExceptions in JspExceptions that describe the attribute name and value causing the error.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static ELEvaluatorsEvaluatorThe singleton instance of the evaluator *
-
Constructor Summary
Constructors Constructor Description Evaluator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectevaluate(java.lang.String pAttributeName, java.lang.String pAttributeValue, java.lang.Class pExpectedType, javax.servlet.jsp.tagext.Tag pTag, javax.servlet.jsp.PageContext pPageContext)Conduit to old-style call for convenience.java.lang.Objectevaluate(java.lang.String pAttributeName, java.lang.String pAttributeValue, java.lang.Class pExpectedType, javax.servlet.jsp.tagext.Tag pTag, javax.servlet.jsp.PageContext pPageContext, java.util.Map functions, java.lang.String defaultPrefix)Evaluates the expression at request timestatic java.lang.StringparseAndRender(java.lang.String pAttributeValue)Parses the given attribute value, then converts it back to a String in its canonical form.java.lang.Stringvalidate(java.lang.String pAttributeName, java.lang.String pAttributeValue)Translation time validation of an attribute value.
-
-
-
Field Detail
-
sEvaluator
static ELEvaluator sEvaluator
The singleton instance of the evaluator *
-
-
Method Detail
-
validate
public java.lang.String validate(java.lang.String pAttributeName, java.lang.String pAttributeValue)Translation time validation of an attribute value. This method will return a null String if the attribute value is valid; otherwise an error message.- Specified by:
validatein interfaceExpressionEvaluator
-
evaluate
public java.lang.Object evaluate(java.lang.String pAttributeName, java.lang.String pAttributeValue, java.lang.Class pExpectedType, javax.servlet.jsp.tagext.Tag pTag, javax.servlet.jsp.PageContext pPageContext, java.util.Map functions, java.lang.String defaultPrefix) throws javax.servlet.jsp.JspExceptionEvaluates the expression at request time- Throws:
javax.servlet.jsp.JspException
-
evaluate
public java.lang.Object evaluate(java.lang.String pAttributeName, java.lang.String pAttributeValue, java.lang.Class pExpectedType, javax.servlet.jsp.tagext.Tag pTag, javax.servlet.jsp.PageContext pPageContext) throws javax.servlet.jsp.JspExceptionConduit to old-style call for convenience.- Specified by:
evaluatein interfaceExpressionEvaluator- Throws:
javax.servlet.jsp.JspException
-
parseAndRender
public static java.lang.String parseAndRender(java.lang.String pAttributeValue) throws javax.servlet.jsp.JspExceptionParses the given attribute value, then converts it back to a String in its canonical form.- Throws:
javax.servlet.jsp.JspException
-
-