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 classData bundle.static final classMethodState's andLockState's state translated for serialization.static final classFrame intercept point.static interfaceFrame modifier.static final classFrame update point.static final classCollection ofSerializedState.Frames that are for different versions of the same method and continuation point combination. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Objectprivate final Coroutineprivate final SerializedState.VersionedFrame[]private static final long -
Constructor Summary
ConstructorsConstructorDescriptionSerializedState(Coroutine coroutine, Object context, SerializedState.VersionedFrame[] frames) Constructs aSerializedStateobject. -
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 aSerializedStateobject.- Parameters:
coroutine- coroutine objectcontext- coroutine contextframes- method states- Throws:
NullPointerException- ifframesIllegalArgumentException- if any elements offramearenullor 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()
-