scope getDeclaredConstructors_cached // TODO: convert to regularly cleared normal map static Map #cache = newDangerousWeakHashMap(); static Constructor[] getDeclaredConstructors_cached(Class c) { Constructor[] ctors; synchronized(cache) { ctors = cache.get(c); if (ctors == null) { cache.put(c, ctors = c.getDeclaredConstructors()); for (ctor : ctors) makeAccessible(ctor); } } ret ctors; }