code: public static Object call(Class<?> oClass, String method, Object obj,
  							  Object[] arg) throws InvocationTargetException,
  			NoSuchMethodException {
  		// Lets just try all methods for now
  		Method[] methods = oClass.getMethods();
  		for (int c = 0; methods != null && c < methods.length; c++) {
  			if (!methods[c].getName().equals(method)) {
  				continue;
  			}
  			if (methods[c].getParameterTypes().length != arg.length) {
  				continue;
  			}
  			if (Modifier.isStatic(methods[c].getModifiers()) != (obj == null)) {
  				continue;
  			}
  			if ((obj == null) && methods[c].getDeclaringClass() != oClass) {
  				continue;
  			}
  
  			try {
  				return methods[c].invoke(obj, arg);
  			} catch (IllegalAccessException | IllegalArgumentException e) {
  				LOG.warn("IGNORE ", e);
  			}
  		}
  
  		throw new NoSuchMethodException(method);
  	}
docs: CHECKSTYLE:ON