001    /*******************************************************************************
002     * Portions created by Sebastian Thomschke are copyright (c) 2005-2011 Sebastian
003     * Thomschke.
004     * 
005     * All Rights Reserved. This program and the accompanying materials
006     * are made available under the terms of the Eclipse Public License v1.0
007     * which accompanies this distribution, and is available at
008     * http://www.eclipse.org/legal/epl-v10.html
009     * 
010     * Contributors:
011     *     Sebastian Thomschke - initial implementation.
012     *******************************************************************************/
013    package net.sf.oval.guard;
014    
015    import java.lang.reflect.Constructor;
016    import java.lang.reflect.Method;
017    
018    import net.sf.oval.exception.ReflectionException;
019    
020    /**
021     * @author Sebastian Thomschke
022     */
023    public interface ParameterNameResolver
024    {
025            /**
026             * Returns an empty String array if no parameters are declared.
027             * @param constructor the constructor
028             * @return an array holding the parameter names of the given constructor.
029             * @throws ReflectionException in case retrieving the parameter names fails
030             */
031            String[] getParameterNames(Constructor< ? > constructor) throws ReflectionException;
032    
033            /**
034             * Returns an empty String array if no parameters are declared
035             * @param method the method
036             * @return an array holding the parameter names of the given method.
037             * @throws ReflectionException in case retrieving the parameter names fails
038             */
039            String[] getParameterNames(Method method) throws ReflectionException;
040    }