/** * Add all possible calls for a given method * * @param callGraph * @param mn */ @SuppressWarnings("unchecked") private static void handleMethodNode(GetStaticGraph staticUsageTree, ClassNode cn, MethodNode mn, int depth) { InsnList instructions = mn.instructions; Iterator<AbstractInsnNode> iterator = instructions.iterator(); // TODO: This really shouldn't be here but in its own class while (iterator.hasNext()) { AbstractInsnNode insn = iterator.next(); if (insn instanceof MethodInsnNode) { handleMethodInsnNode(staticUsageTree, cn, mn, (MethodInsnNode) insn, depth + 1); } else if (insn instanceof FieldInsnNode) { handleFieldInsnNode(staticUsageTree, cn, mn, (FieldInsnNode) insn, depth + 1); } } }