Class StreamHelperCalls

java.lang.Object
org.ek9lang.compiler.phase7.support.StreamHelperCalls

public final class StreamHelperCalls extends Object
THE call shapes for the compiler-to-runtime helper types stream pipelines lower onto (Ek9Async, Ek9Group, Ek9Split, Ek9Join, Ek9Uniq, the tail buffer, Ek9Sort) - use these, do not hand-roll another; the sibling of ListBufferCalls, which owns the List buffer.

PLUMBING: every call here is made on a runtime helper that has no EK9 symbol, because it is the compiler's own lowering, so none carries call metadata (purity and complexity describe something a user authored, see CompilerPlumbingCalls). The null metadata is stated once, here. When the metadata question for these calls is decided, this is the one place that changes.

Return type names are kept exactly as the call sites always spelled them ("Boolean" for a question answered by a helper, Any for an element), as nothing in the @IR goldens can see them.

  • Method Details

    • create

      public static CallDetails create(String helperTypeName)
      The static create() of a helper type: a fresh helper typed as itself.
    • guardDiffer

      public static CallDetails guardDiffer(String sourceVar, String sinkVar)
      The static Ek9StreamGuard.differ(source, sink): fails when a stream's evaluated source and one of its appending sinks are the same object (THE run-time alias check, Steve 2026-10-27).
    • createTail

      public static CallDetails createTail(String tailTypeName, String integerTypeName, String limitVar)
      The static create(Integer limit) of the tail buffer type.
    • hasNext

      public static CallDetails hasNext(String sourceVar, String sourceTypeName, String hasNextMethod)
      source.hasNext() on a drained helper (async executor, tracker or tail buffer): a Boolean.
    • next

      public static CallDetails next(String sourceVar, String sourceTypeName, String nextMethod)
      source.next() on a drained helper: an Any element.
    • asyncSubmit

      public static CallDetails asyncSubmit(String executorVar, String itemVar)
      executor.submit(item).
    • asyncClose

      public static CallDetails asyncClose(String executorVar)
      executor.close().
    • asyncCancel

      public static CallDetails asyncCancel(String executorVar)
      executor.cancel().
    • asyncSortResults

      public static CallDetails asyncSortResults(String executorVar)
      executor.sortResults().
    • groupIsKeyChanged

      public static CallDetails groupIsKeyChanged(String groupTrackerVar, String keyVar)
      group.isKeyChanged(key): a Boolean.
    • groupIsKeyChanged

      public static CallDetails groupIsKeyChanged(String groupTrackerVar, String keyVar, String elementVar)
      group.isKeyChanged(key, element) for group by: the key AND the element it was made from, so an unset ELEMENT is kept for the final unset group whatever its key is (D24, sort | group).
    • addGroup

      public static CallDetails addGroup(String trackerVar, String trackerTypeName, String groupVar)
      tracker.addGroup(group) on a group or split tracker.
    • wasStarted

      public static CallDetails wasStarted(String trackerVar, String trackerTypeName)
      tracker.wasStarted() on a group or split tracker: a Boolean.
    • hasNextGroup

      public static CallDetails hasNextGroup(String trackerVar, String trackerTypeName)
      tracker.hasNextGroup() on a group or split tracker: a Boolean.
    • nextGroup

      public static CallDetails nextGroup(String trackerVar, String trackerTypeName)
      tracker.nextGroup() on a group or split tracker: an Any group.
    • splitIsBoundary

      public static CallDetails splitIsBoundary(String splitTrackerVar, String itemVar, String predicateResultVar)
      split.isBoundary(item, predicateResult): the item and the boundary predicate's answer for it; a primitive boolean. An unset ITEM is kept for the final unset group and is never a boundary (D24, split).
    • joinIsFirst

      public static CallDetails joinIsFirst(String joinTrackerVar)
      join.isFirst(): a Boolean.
    • joinHasResult

      public static CallDetails joinHasResult(String joinTrackerVar)
      join.hasResult(): a Boolean.
    • uniqIsNew

      public static CallDetails uniqIsNew(String uniqTrackerVar, String itemVar)
      uniq.isNew(item): a Boolean.
    • tailPipe

      public static CallDetails tailPipe(String tailBufferVar, String tailTypeName, String itemVar)
      tail.pipe(item) on the tail buffer.
    • sort

      public static CallDetails sort(String listTypeName, String bufferVar)
      The static Ek9Sort.sort(buffer).
    • sort

      public static CallDetails sort(String listTypeName, String bufferVar, String comparatorVar)
      The static Ek9Sort.sort(buffer, comparator).