Java Reflection Method Name getMethod(Class beanClass, String methodName, Class[] types)

Here you can find the source of getMethod(Class beanClass, String methodName, Class[] types)

Description

get Method

License

Open Source License

Parameter

Parameter Description
beanClass a parameter
methodName a parameter
parameters a parameter

Exception

Parameter Description
NoSuchMethodException an exception
SecurityException an exception

Return

method

Declaration

private static Method getMethod(Class<?> beanClass, String methodName, Class<?>[] types)
        throws SecurityException, NoSuchMethodException 

Method Source Code


//package com.java2s;

import java.lang.reflect.Method;

public class Main {
    /**/*from  w  w w  . j a va  2s.  c  o  m*/
     *
     * @param beanClass
     * @param methodName
     * @param parameters
     * @return method
     * @throws NoSuchMethodException
     * @throws SecurityException
     */
    private static Method getMethod(Class<?> beanClass, String methodName, Class<?>[] types)
            throws SecurityException, NoSuchMethodException {
        return beanClass.getDeclaredMethod(methodName, types);
    }
}

Related

  1. getMethod(Class targetClass, String methodName, Class[] paramTypes)
  2. getMethod(Class targetClass, String name, Class paramClass)
  3. getMethod(Class targetClass, String targetMethodName)
  4. getMethod(Class theClass, String propertyName)
  5. getMethod(Class type, String name, Class[] paramTypes)
  6. getMethod(Class c, String name)
  7. getMethod(Class c, String name)
  8. getMethod(Class c, String name, Class[] args)
  9. getMethod(Class clazz, String methodName)