Class CoroutineWriter

java.lang.Object
com.offbynull.coroutines.user.CoroutineWriter

public final class CoroutineWriter extends Object
Writes out (serializes) the current state of a CoroutineRunner object.
  • Field Details

  • Constructor Details

    • CoroutineWriter

      public CoroutineWriter()
      Construct a CoroutineWriter object. Equivalent to calling new CoroutineWriter(new DefaultCoroutineSerializer(), new FrameUpdatePoint[0], new FrameInterceptPoint[0]).
    • CoroutineWriter

      public CoroutineWriter(SerializedState.FrameUpdatePoint[] frameUpdatePoints)
      Constructs a CoroutineWriter. Equivalent to calling new CoroutineWriter(new DefaultCoroutineSerializer(), frameUpdatePoints, new FrameInterceptPoint[0]).
      Parameters:
      frameUpdatePoints - frame update points
      Throws:
      IllegalArgumentException - if frameUpdatePoints contains more than one entry for the same identifier (className/oldMethodId/newMethodId/continuationPoint)
      NullPointerException - if any argument is null
    • CoroutineWriter

      public CoroutineWriter(SerializedState.FrameInterceptPoint[] frameInterceptPoints)
      Constructs a CoroutineWriter. Equivalent to calling new CoroutineWriter(new DefaultCoroutineSerializer(), new FrameUpdatePoint[0], frameInterceptPoints).
      Parameters:
      frameInterceptPoints - frame intercept points
      Throws:
      IllegalArgumentException - if frameInterceptPoints contains more than one entry for the same identifier (className/methodId/continuationPoint)
      NullPointerException - if any argument is null
    • CoroutineWriter

      public CoroutineWriter(SerializedState.FrameUpdatePoint[] frameUpdatePoints, SerializedState.FrameInterceptPoint[] frameInterceptPoints)
      Constructs a CoroutineWriter. Equivalent to calling new CoroutineWriter(new DefaultCoroutineSerializer(), frameUpdatePoints, frameInterceptPoints).
      Parameters:
      frameUpdatePoints - frame update points
      frameInterceptPoints - frame intercept points
      Throws:
      IllegalArgumentException - if frameUpdatePoints contains more than one entry for the same identifier (className/oldMethodId/newMethodId/continuationPoint), or if frameInterceptPoints contains more than one entry for the same identifier (className/methodId/continuationPoint)
      NullPointerException - if any argument is null
    • CoroutineWriter

      public CoroutineWriter(CoroutineWriter.CoroutineSerializer serializer, SerializedState.FrameUpdatePoint[] frameUpdatePoints, SerializedState.FrameInterceptPoint[] frameInterceptPoints)
      Constructs a CoroutineWriter object.
      Parameters:
      serializer - serializer to write out the coroutine state
      frameUpdatePoints - frame update points
      frameInterceptPoints - frame intercept points
      Throws:
      NullPointerException - if any argument is null or contains null
      IllegalArgumentException - if frameUpdatePoints contains more than one entry for the same identifier (className/oldMethodId/newMethodId/continuationPoint), or if frameInterceptPoints contains more than one entry for the same identifier (className/methodId/continuationPoint)
  • Method Details