Package com.offbynull.coroutines.user
Class SerializedState
- java.lang.Object
-
- com.offbynull.coroutines.user.SerializedState
-
- All Implemented Interfaces:
java.io.Serializable
public final class SerializedState extends java.lang.Object implements java.io.SerializableCoroutineRunner's state translated for serialization.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSerializedState.DataData bundle.static classSerializedState.FrameMethodState's andLockState's state translated for serialization.static classSerializedState.FrameInterceptPointFrame intercept point.static interfaceSerializedState.FrameModifierFrame modifier.static classSerializedState.FrameUpdatePointFrame update point.static classSerializedState.VersionedFrameCollection ofSerializedState.Frames that are for different versions of the same method and continuation point combination.
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Objectcontextprivate Coroutinecoroutineprivate SerializedState.VersionedFrame[]framesprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description SerializedState(Coroutine coroutine, java.lang.Object context, SerializedState.VersionedFrame[] frames)Constructs aSerializedStateobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetContext()Get coroutine context.CoroutinegetCoroutine()Get coroutine.SerializedState.VersionedFrame[]getFrames()Get coroutine method states.(package private) voidvalidateState()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
coroutine
private final Coroutine coroutine
-
context
private final java.lang.Object context
-
frames
private final SerializedState.VersionedFrame[] frames
-
-
Constructor Detail
-
SerializedState
public SerializedState(Coroutine coroutine, java.lang.Object context, SerializedState.VersionedFrame[] frames)
Constructs aSerializedStateobject.- Parameters:
coroutine- coroutine objectcontext- coroutine contextframes- method states- Throws:
java.lang.NullPointerException- ifframesjava.lang.IllegalArgumentException- if any elements offramearenullor are otherwise in an invalid state
-
-
Method Detail
-
getCoroutine
public Coroutine getCoroutine()
Get coroutine.- Returns:
- coroutine
-
getContext
public java.lang.Object getContext()
Get coroutine context.- Returns:
- coroutine context
-
getFrames
public SerializedState.VersionedFrame[] getFrames()
Get coroutine method states.- Returns:
- coroutine method states
-
validateState
void validateState()
-
-