/** * Tells the <code>PhaseDumper</code> that a {@link Scene} transforming phase has started, so that it can dump the phases's * “before” files. If the phase is to be dumped, <code>dumpBefore</code> deletes any old graph files dumped * during previous runs of the phase. * * @param phaseName * the name of the phase that has just started. */ public void dumpBefore(String phaseName) { phaseStack.push(phaseName); if (isBodyDumpingPhase(phaseName)) { dumpAllBodies(phaseName + ".in", true); } }
/** * Tells the <code>PhaseDumper</code> that a {@link Scene} transforming phase has ended, so that it can dump the phases's * “after” files. * * @param phaseName * the name of the phase that has just ended. * * @throws IllegalArgumentException * if <code>phaseName</code> does not match the <code>PhaseDumper</code>'s record of the current phase. */ public void dumpAfter(String phaseName) { String poppedPhaseName = phaseStack.pop(); if (poppedPhaseName != phaseName) { throw new IllegalArgumentException("dumpAfter(" + phaseName + ") when poppedPhaseName == " + poppedPhaseName); } if (isBodyDumpingPhase(phaseName)) { dumpAllBodies(phaseName + ".out", false); } }