Object evaluate ( String pExpressionString , Object pContext , Class pExpectedType , Map functions , String defaultPrefix , Logger pLogger ) throws ELException { // Check for null expression strings if ( pExpressionString == null ) { throw new ELException ( Constants . NULL_EXPRESSION_STRING ) ; } // Set the PageContext; pageContext = ( PageContext ) pContext ; // Get the parsed version of the expression string Object parsedValue = parseExpressionString ( pExpressionString ) ; // Evaluate differently based on the parsed type if ( parsedValue instanceof String ) { // Convert the String, and cache the conversion String strValue = ( String ) parsedValue ; return convertStaticValueToExpectedType ( strValue , pExpectedType , pLogger ) ; } else if ( parsedValue instanceof Expression ) { // Evaluate the expression and convert Object value = ( ( Expression ) parsedValue ) . evaluate ( pContext , mResolver , functions , defaultPrefix , pLogger ) ; return convertToExpectedType ( value , pExpectedType , pLogger ) ; } else if ( parsedValue instanceof ExpressionString ) { // Evaluate the expression/string list and convert String strValue = ( ( ExpressionString ) parsedValue ) . evaluate ( pContext , mResolver , functions , defaultPrefix , pLogger ) ; return convertToExpectedType ( strValue , pExpectedType , pLogger ) ; } else { // This should never be reached return null ; } }
Evaluates the given expression string