try {
// Clojure might break up a single function into several classes. We must instrument them all.
for (Map.Entry<String, ClassEntry> entry : Retransform.getMethodDB().getInnerClassesEntries(Type.getInternalName(clazz)).entrySet()) {
final String className = entry.getKey();
final ClassEntry ce = entry.getValue();
final Class cls = Class.forName(className.replaceAll("/", "."), false, clazz.getClassLoader());
//System.out.println("---- " + cls + " " + IFn.class.isAssignableFrom(cls));
ce.setRequiresInstrumentation(true);
Method[] methods = cls.getMethods();
for (Method method : methods) {
if ((IFn.class.isAssignableFrom(cls) && (method.getName().equals("invoke") || method.getName().equals("doInvoke")))
|| (cls == clazz && !isIFn && protocolMethods.contains(method.getName()))) { // method.getDeclaringClass().equals(clazz))) {
ce.set(method.getName(), Type.getMethodDescriptor(method), MethodDatabase.SuspendableType.SUSPENDABLE);
}
}
Retransform.retransform(cls);
}
} catch (ClassNotFoundException e) {