sO getMainClassForThread(Thread t) { if (t == null) null; try object getMainClass(callOpt(t, "getTarget")); // BetterThread ret getMainClass(t); }