// This is a bit rough... finds static and non-static methods. // It's usually just for error messages though, so no worries. static boolean hasMethodNamed(O obj, String method) { if (obj == null) ret false; if (obj instanceof Class) ret hasMethodNamed((Class) obj, method); ret hasMethodNamed(obj.getClass(), method); } static boolean hasMethodNamed(Class c, String method) { if (c == null) false; ret getMethodCache(c).cache.containsKey(method); }