code: private static Method getMethod(final Class<?> mbean,
                                    final String method,
                                    final String... params) {
      try {
        final ClassLoader loader = mbean.getClassLoader();
        final Class<?>[] paramClasses = new Class<?>[params.length];
        for (int i = 0; i < params.length; i++) {
          paramClasses[i] = primitives.get(params[i]);
          if (paramClasses[i] == null) {
            paramClasses[i] = Class.forName(params[i], false, loader);
          }
        }
        return mbean.getMethod(method, paramClasses);
      } catch (RuntimeException e) {
        throw e;
      } catch (Exception e) {
        return null;
      }
    }
docs: Returns the Method with the specified name and parameter types for the given class,
  null if it doesn't exist.
  @param mbean
  @param method
  @param params
  @return