001    /**
002     *
003     * Copyright 2003-2004 The Apache Software Foundation
004     *
005     *  Licensed under the Apache License, Version 2.0 (the "License");
006     *  you may not use this file except in compliance with the License.
007     *  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    // This source code implements specifications defined by the Java
020    // Community Process. In order to remain compliant with the specification
021    // DO NOT add / change / or delete method signatures!
022    //
023    
024    package javax.servlet.jsp.el;
025    
026    /**
027     * <p>This class is used to customize the way an ExpressionEvaluator resolves
028     * variable references at evaluation time.  For example, instances of this class can
029     * implement their own variable lookup mechanisms, or introduce the
030     * notion of "implicit variables" which override any other variables.
031     * An instance of this class should be passed when evaluating
032     * an expression.</p>
033     *
034     * <p>An instance of this class includes the context against which resolution
035     * will happen</p>
036     *
037     * @since 2.0
038     */
039    public interface VariableResolver
040    {
041      //-------------------------------------
042      /**
043       * Resolves the specified variable.
044       * Returns null if the variable is not found.
045       * 
046       * @param pName the name of the variable to resolve
047       * @return the result of the variable resolution
048       *
049       * @throws ELException if a failure occurred while trying to resolve
050       *     the given variable
051       **/
052      public Object resolveVariable (String pName)
053        throws ELException;
054                                            
055      //-------------------------------------
056    }