Class SerializedState

  • All Implemented Interfaces:
    java.io.Serializable

    public final class SerializedState
    extends java.lang.Object
    implements java.io.Serializable
    CoroutineRunner's state translated for serialization.
    See Also:
    Serialized Form
    • Constructor Detail

      • SerializedState

        public SerializedState​(Coroutine coroutine,
                               java.lang.Object context,
                               SerializedState.VersionedFrame[] frames)
        Constructs a SerializedState object.
        Parameters:
        coroutine - coroutine object
        context - coroutine context
        frames - method states
        Throws:
        java.lang.NullPointerException - if frames
        java.lang.IllegalArgumentException - if any elements of frame are null or 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
      • validateState

        void validateState()