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>This class is used to customize the way an ExpressionEvaluator resolves
21 * variable references at evaluation time. For example, instances of this class can
22 * implement their own variable lookup mechanisms, or introduce the
23 * notion of "implicit variables" which override any other variables.
24 * An instance of this class should be passed when evaluating
25 * an expression.</p>
26 *
27 * <p>An instance of this class includes the context against which resolution
28 * will happen</p>
29 *
30 * @since 2.0
31 */
32 public interface VariableResolver {
33 //-------------------------------------
34 /**
35 * Resolves the specified variable.
36 * Returns null if the variable is not found.
37 *
38 * @param pName the name of the variable to resolve
39 * @return the result of the variable resolution
40 *
41 * @throws ELException if a failure occurred while trying to resolve
42 * the given variable
43 **/
44 public Object resolveVariable(String pName) throws ELException;
45
46 //-------------------------------------
47 }
|