001    /*
002     * Copyright 2002-2004 The Apache Software Foundation
003     *
004     * Licensed under the Apache License, Version 2.0 (the "License");
005     * you may not use this file except in compliance with the License.
006     * You may obtain a copy of the License at
007     *
008     *     http://www.apache.org/licenses/LICENSE-2.0
009     *
010     * Unless required by applicable law or agreed to in writing, software
011     * distributed under the License is distributed on an "AS IS" BASIS,
012     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013     * See the License for the specific language governing permissions and
014     * limitations under the License.
015     */
016    package org.apache.commons.clazz.reflect.common;
017    
018    import java.lang.reflect.Method;
019    
020    /**
021     * Container for the results of method parsing: propertyName 
022     * and two types. The types are used differently depending on
023     * how the corresponding AccessorMethodParser uses them. 
024     *  
025     * @author <a href="mailto:dmitri@apache.org">Dmitri Plotnikov</a>
026     * @version $Id: AccessorMethodParseResults.java 155436 2005-02-26 13:17:48Z dirkv $
027     */
028    public class AccessorMethodParseResults {
029    
030        private Method method;
031        private String propertyName;
032        private Class type;
033        private Class parameterType;
034        
035        public AccessorMethodParseResults(Method method, 
036                            String propertyName, Class type, Class parameterType)
037        {
038            this.method = method;
039            this.propertyName = propertyName;
040            this.type = type;
041            this.parameterType = parameterType;
042        }
043        
044        /**
045         * Returns the method.
046         * @return Method
047         */
048        public Method getMethod() {
049            return method;
050        }
051    
052        /**
053         * Returns the propertyName.
054         * @return String
055         */
056        public String getPropertyName() {
057            return propertyName;
058        }
059    
060        /**
061         * Returns the type.
062         * @return Class
063         */
064        public Class getType() {
065            return type;
066        }
067    
068        /**
069         * Returns the parameterType.
070         * @return Class
071         */
072        public Class getParameterType() {
073            return parameterType;
074        }
075    }