Java Reflection Method Name getMethod(String methodName, Class clazz, Class... args)

Here you can find the source of getMethod(String methodName, Class clazz, Class... args)

Description

get Method

License

Open Source License

Declaration

private static Method getMethod(String methodName, Class<?> clazz, Class<?>... args) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.lang.reflect.Method;

public class Main {

    private static Method getMethod(String methodName, Class<?> clazz, Class<?>... args) {
        Method method;//from w  w  w. j a v a  2  s.co m
        try {
            method = clazz.getMethod(methodName, args);
        } catch (NoSuchMethodException e1) {
            method = null;
        }
        return method;
    }
}

Related

  1. getMethod(String className)
  2. getMethod(String className, String functionName, Class[] paramTypes)
  3. getMethod(String className, String functionName, Class[] paramTypes)
  4. getMethod(String className, String methodName, Class[] params)
  5. getMethod(String methodName, Class clazz)
  6. getMethod(String methodName, Class klass)
  7. getMethod(String methodName, Class type)
  8. getMethod(String methodName, Class[] paramTypes, Class targetClass)
  9. getMethod(String methodName, Class[] params)