Class Parameterisations

java.lang.Object
org.ek9lang.compiler.phase5.construction.Parameterisations

public final class Parameterisations extends Object
Every parameterisation of a generic that exists in the program, so FE77 can apply a generic's construction steps to each concrete parameterisation and find the concrete type a substituted one names.

Swept across ALL parsed modules: a parameterised type is registered in the scope of whichever file resolved it first, which need not be the file defining the generic (as GenericInputVarietyWidener found). Nothing is created here - phase 5 may not add types - so a substitution that FULL_RESOLUTION never made is simply absent, and the check misses that path rather than guessing.

  • Method Details

    • of

      public static Parameterisations of(CompilableProgram program)
      Sweep the program's module scopes. Call under the program lock.
    • all

      public List<PossibleGenericSymbol> all()
      Every concrete parameterisation of a developer's generic that exists in the program. The property-cycle pass marks each one analysed, so phase 7 can tell a parameterisation made after phase 5 (which it must guard).
    • concreteOf

      public List<PossibleGenericSymbol> concreteOf(PossibleGenericSymbol generic)
      The concrete parameterisations of a generic, in a stable order.
    • lookup

      The existing parameterisation of a generic with exactly these (concrete) arguments, if there is one.
    • isConcrete

      static boolean isConcrete(ISymbol type)
      A type that names no conceptual type parameter anywhere in it.