1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 19 package javax.servlet.jsp.el; 20 21 22 /** 23 * <p>The abstract class for a prepared expression.</p> 24 * 25 * <p>An instance of an Expression can be obtained via from an 26 * ExpressionEvaluator instance.</p> 27 * 28 * <p>An Expression may or not have done a syntactic parse of the expression. 29 * A client invoking the evaluate() method should be ready for the case 30 * where ELParseException exceptions are raised. </p> 31 * 32 * @since 2.0 33 * @deprecated 34 */ 35 public abstract class Expression { 36 37 /** 38 * Evaluates an expression that was previously prepared. In some 39 * implementations preparing an expression involves full syntactic 40 * validation, but others may not do so. Evaluating the expression may 41 * raise an ELParseException as well as other ELExceptions due to 42 * run-time evaluation. 43 * 44 * @param vResolver A VariableResolver instance that can be used at 45 * runtime to resolve the name of implicit objects into Objects. 46 * @return The result of the expression evaluation. 47 * 48 * @exception ELException Thrown if the expression evaluation failed. 49 */ 50 public abstract Object evaluate( VariableResolver vResolver ) 51 throws ELException; 52 } 53 54