scope nonDefaultInterfaceMethods // TODO: convert to regularly cleared normal map static Map #cache = newDangerousWeakHashMap(); static Method[] nonDefaultInterfaceMethods(Class c) { Method[] methods; synchronized(cache) { methods = cache.get(c); if (methods == null) cache.put(c, methods = findNonDefaultInterfaceMethods(c)); } ret methods; }