public final class StackRecorder extends Stack
Stack.| Modifier and Type | Field and Description |
|---|---|
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().
|
| Constructor and Description |
|---|
StackRecorder(Runnable target)
Creates a new empty
StackRecorder that runs the given target. |
StackRecorder(Stack parent)
Creates a clone of the given
StackRecorder. |
| Modifier and Type | Method and Description |
|---|---|
SuspendResult |
execute(ResumeParameter parameter) |
static void |
exit() |
static StackRecorder |
get()
Return the continuation, which is associated to the current thread.
|
Object |
getContext()
Access value supplied to resumed method
|
static Object |
suspend(SuspendResult value) |
getRunnable, hasDouble, hasFloat, hasInt, hasLong, hasObject, hasReference, isEmpty, isSerializable, popDouble, popFloat, popInt, popLong, popObject, popReference, pushDouble, pushFloat, pushInt, pushLong, pushObject, pushReference, toStringpublic transient boolean isRestoring
This field is accessed from the byte code injected into application code, and therefore defining a wrapper get method makes it awkward to step through the user code. That's why this field is public.
public transient boolean isCapturing
isRestoringpublic StackRecorder(Runnable target)
StackRecorder that runs the given target.target - a target to runpublic StackRecorder(Stack parent)
StackRecorder.parent - a StackRecorder to clonepublic static Object suspend(SuspendResult value)
public SuspendResult execute(ResumeParameter parameter)
public static void exit()
public Object getContext()
null)public static StackRecorder get()
null if invoked outside
of continuation contextCopyright © 2018. All rights reserved.