Iterator<BasicBlock> i = cfg.blockIterator(); while (i.hasNext()) { BasicBlock bb = i.next(); out.println(); out.println("BASIC BLOCK: " + bb.getId() + (bb.isExceptionThrower() ? " [EXCEPTION THROWER]" : "") + blockStartAnnotate(bb)); if (bb.isExceptionThrower()) { out.println("  Exception thrower: " + bb.getExceptionThrower()); } CodeExceptionGen exceptionGen = bb.getExceptionGen(); if (exceptionGen != null) { System.out.println("    CATCHES " + exceptionGen.getCatchType()); } Iterator<InstructionHandle> j = bb.instructionIterator(); while (j.hasNext()) { InstructionHandle handle = j.next(); out.println(handle + instructionAnnotate(handle, bb)); } out.println("END" + blockAnnotate(bb)); Iterator<Edge> edgeIter = cfg.outgoingEdgeIterator(bb); while (edgeIter.hasNext()) { Edge edge = edgeIter.next(); out.println("  " + edge + " " + edgeAnnotate(edge)); }
Iterator<BasicBlock> i = cfg.blockIterator(); while (i.hasNext()) { BasicBlock bb = i.next(); out.println(); out.println("BASIC BLOCK: " + bb.getId() + (bb.isExceptionThrower() ? " [EXCEPTION THROWER]" : "") + blockStartAnnotate(bb)); if (bb.isExceptionThrower()) { out.println("  Exception thrower: " + bb.getExceptionThrower()); } CodeExceptionGen exceptionGen = bb.getExceptionGen(); if (exceptionGen != null) { System.out.println("	CATCHES " + exceptionGen.getCatchType()); } Iterator<InstructionHandle> j = bb.instructionIterator(); while (j.hasNext()) { InstructionHandle handle = j.next(); out.println(handle + instructionAnnotate(handle, bb)); } out.println("END" + blockAnnotate(bb)); Iterator<Edge> edgeIter = cfg.outgoingEdgeIterator(bb); while (edgeIter.hasNext()) { Edge edge = edgeIter.next(); out.println("  " + edge + " " + edgeAnnotate(edge)); } }
    public void print(PrintStream out) {	Iterator<BasicBlock> i = cfg.blockIterator();	while (i.hasNext()) {	    BasicBlock bb = i.next();	    out.println();	    out.println("BASIC BLOCK: " + bb.getId() + (bb.isExceptionThrower() ? " [EXCEPTION THROWER]" : "") + blockStartAnnotate(bb));	    if (bb.isExceptionThrower()) {		out.println("  Exception thrower: " + bb.getExceptionThrower());	    }	    CodeExceptionGen exceptionGen = bb.getExceptionGen();	    if (exceptionGen != null) {		System.out.println("    CATCHES " + exceptionGen.getCatchType());	    }	    Iterator<InstructionHandle> j = bb.instructionIterator();	    while (j.hasNext()) {		InstructionHandle handle = j.next();		out.println(handle + instructionAnnotate(handle, bb));	    }	    out.println("END" + blockAnnotate(bb));	    Iterator<Edge> edgeIter = cfg.outgoingEdgeIterator(bb);	    while (edgeIter.hasNext()) {		Edge edge = edgeIter.next();		out.println("  " + edge + " " + edgeAnnotate(edge));	    }	}    }