/** * Set the current stackframe to a specific frame. * * @param nFrame the number of the desired stackframe. Frame zero is the closest to the current * program counter * @throws IllegalAccessError when the thread isn't suspended or waiting at a breakpoint * @throws ArrayIndexOutOfBoundsException when the requested frame is beyond the stack boundary */ public void setCurrentFrameIndex(int nFrame) throws IncompatibleThreadStateException { assureSuspended(); if ((nFrame < 0) || (nFrame >= thread.frameCount())) { throw new ArrayIndexOutOfBoundsException(); } currentFrameIndex = nFrame; }