static Map nuObjectWithoutArguments_cache = newWeakHashMap(); static O nuObjectWithoutArguments(S className) ctex { ret nuObjectWithoutArguments(classForName(className)); } static A nuObjectWithoutArguments(Class c) ctex { Constructor m; m = nuObjectWithoutArguments_cache.get(c); if (m == null) nuObjectWithoutArguments_cache.put(c, m = nuObjectWithoutArguments_findConstructor(c)); return (A) m.newInstance(); } static Constructor nuObjectWithoutArguments_findConstructor(Class c) { for (Constructor m : c.getDeclaredConstructors()) if (empty(m.getParameterTypes())) { m.setAccessible(true); ret m; } fail("No default constructor found in " + c.getName()); }