001 /* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 018 019 package javax.servlet.jsp.el; 020 021 022 /** 023 * <p>The abstract class for a prepared expression.</p> 024 * 025 * <p>An instance of an Expression can be obtained via from an 026 * ExpressionEvaluator instance.</p> 027 * 028 * <p>An Expression may or not have done a syntactic parse of the expression. 029 * A client invoking the evaluate() method should be ready for the case 030 * where ELParseException exceptions are raised. </p> 031 * 032 * @since 2.0 033 * @deprecated 034 */ 035 public abstract class Expression { 036 037 /** 038 * Evaluates an expression that was previously prepared. In some 039 * implementations preparing an expression involves full syntactic 040 * validation, but others may not do so. Evaluating the expression may 041 * raise an ELParseException as well as other ELExceptions due to 042 * run-time evaluation. 043 * 044 * @param vResolver A VariableResolver instance that can be used at 045 * runtime to resolve the name of implicit objects into Objects. 046 * @return The result of the expression evaluation. 047 * 048 * @exception ELException Thrown if the expression evaluation failed. 049 */ 050 public abstract Object evaluate( VariableResolver vResolver ) 051 throws ELException; 052 } 053