code: public static Method findPublicMethod(Class<?> clazz, String methodName,
              Class<?>[] parameterTypes) {
  
          try {
              return clazz.getMethod(methodName, parameterTypes);
          } catch (Exception e) {
              Class<?> superclass = clazz.getSuperclass();
              if (superclass != null) {
                  return findPublicMethod(superclass, methodName, parameterTypes);
              }
          }
          return null;
      }
docs: Returns a public Method object that reflects the specified public member
  method of the class or interface represented by given class.<br>
  Returns null if not find.
  
  @param clazz
  the method belong to.
  @param methodName
  the name of the method which you want to get.
  @param parameterTypes
  the parameter types of the method which you want to get.
  @return a public Method object that reflects the specified public member
  method of the class or interface represented by given class.