Package com.offbynull.coroutines.user
Class SerializedState
java.lang.Object
com.offbynull.coroutines.user.SerializedState
- All Implemented Interfaces:
Serializable
CoroutineRunner
's state translated for serialization.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Data bundle.static final class
MethodState
's andLockState
's state translated for serialization.static final class
Frame intercept point.static interface
Frame modifier.static final class
Frame update point.static final class
Collection ofSerializedState.Frame
s that are for different versions of the same method and continuation point combination. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Object
private final Coroutine
private final SerializedState.VersionedFrame[]
private static final long
-
Constructor Summary
ConstructorsConstructorDescriptionSerializedState
(Coroutine coroutine, Object context, SerializedState.VersionedFrame[] frames) Constructs aSerializedState
object. -
Method Summary
Modifier and TypeMethodDescriptionGet coroutine context.Get coroutine.Get coroutine method states.(package private) void
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
coroutine
-
context
-
frames
-
-
Constructor Details
-
SerializedState
public SerializedState(Coroutine coroutine, Object context, SerializedState.VersionedFrame[] frames) Constructs aSerializedState
object.- Parameters:
coroutine
- coroutine objectcontext
- coroutine contextframes
- method states- Throws:
NullPointerException
- ifframes
IllegalArgumentException
- if any elements offrame
arenull
or are otherwise in an invalid state
-
-
Method Details
-
getCoroutine
Get coroutine.- Returns:
- coroutine
-
getContext
Get coroutine context.- Returns:
- coroutine context
-
getFrames
Get coroutine method states.- Returns:
- coroutine method states
-
validateState
void validateState()
-