org.apache.commons.javaflow.bytecode
Class StackRecorder

java.lang.Object
  extended byorg.apache.commons.javaflow.bytecode.Stack
      extended byorg.apache.commons.javaflow.bytecode.StackRecorder
All Implemented Interfaces:
java.io.Serializable

public final class StackRecorder
extends Stack

Adds additional behaviors necessary for stack capture/restore on top of Stack.

See Also:
Serialized Form

Constructor Summary
StackRecorder(java.lang.Runnable target)
          Creates a new empty StackRecorder that runs the given target.
StackRecorder(Stack parent)
          Creates a clone of the given StackRecorder.
 
Method Summary
 StackRecorder execute(java.lang.Object context)
           
static StackRecorder get()
          Return the continuation, which is associated to the current thread.
 java.lang.Object getContext()
           
 boolean isCapturing()
          True, is the continuation freeze the strack trace, and stops the continuation.
 boolean isRestoring()
          True, if the continuation restores the previous stack trace to the last invocation of suspend().
static void suspend()
           
 
Methods inherited from class org.apache.commons.javaflow.bytecode.Stack
hasDouble, hasFloat, hasInt, hasLong, hasObject, hasReference, isEmpty, popDouble, popFloat, popInt, popLong, popObject, popReference, pushDouble, pushFloat, pushInt, pushLong, pushObject, pushReference, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StackRecorder

public StackRecorder(java.lang.Runnable target)
Creates a new empty StackRecorder that runs the given target.


StackRecorder

public StackRecorder(Stack parent)
Creates a clone of the given StackRecorder.

Method Detail

suspend

public static void suspend()

isRestoring

public boolean isRestoring()
True, if the continuation restores the previous stack trace to the last invocation of suspend().


isCapturing

public boolean isCapturing()
True, is the continuation freeze the strack trace, and stops the continuation.


execute

public StackRecorder execute(java.lang.Object context)

getContext

public java.lang.Object getContext()

get

public static StackRecorder get()
Return the continuation, which is associated to the current thread.



Copyright © 2004-2005 The Apache Software Foundation. All Rights Reserved.