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