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    package org.apache.commons.el;
018    
019    import javax.servlet.jsp.el.ELException;
020    import javax.servlet.jsp.el.FunctionMapper;
021    import javax.servlet.jsp.el.VariableResolver;
022    
023    /**
024     *
025     * <p>Represents an element that can appear as a suffix in a complex
026     * value, such as a property or index operator, or a method call (should
027     * they ever need to be supported).
028     * 
029     * @author Nathan Abramson - Art Technology Group
030     * @author Shawn Bayern
031     * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: bayard $
032     **/
033    
034    public abstract class ValueSuffix
035    {
036      //-------------------------------------
037      /**
038       *
039       * Returns the expression in the expression language syntax
040       **/
041      public abstract String getExpressionString ();
042    
043      //-------------------------------------
044      /**
045       *
046       * Evaluates the expression in the given context, operating on the
047       * given value.
048       **/
049      public abstract Object evaluate (Object pValue,
050                                       VariableResolver pResolver,
051                                       FunctionMapper functions)
052        throws ELException;
053    
054      public abstract ValueSuffix bindFunctions(FunctionMapper functions)
055      throws ELException;
056    
057      //-------------------------------------
058    }