static new TreeMap hotwireCached_cache; static Lock hotwireCached_lock = lock(); static Class hotwireCached(S programID) { ret hotwireCached(programID, true); } static Class hotwireCached(S programID, bool runMain) { ret hotwireCached(programID, runMain, false); } static Class hotwireCached(S programID, bool runMain, bool dependent) { lock hotwireCached_lock; programID = formatSnippetID(programID); Class c = hotwireCached_cache.get(programID); if (c == null) { c = hotwire(programID); if (dependent) makeDependent(c); if (runMain) callMain(c); hotwireCached_cache.put(programID, c); } ret c; }