Class ConstrainedEnumerationBase

java.lang.Object
org.ek9lang.compiler.support.ConstrainedEnumerationBase
All Implemented Interfaces:
Function<IAggregateSymbol, Optional<IAggregateSymbol>>

public final class ConstrainedEnumerationBase extends Object implements Function<IAggregateSymbol, Optional<IAggregateSymbol>>
The base enumeration of a CONSTRAINED enumeration (RedSuit as CardSuit constrain as ...); empty for a base enumeration and for anything not enumeration-based.

A constrained enumeration has genus SymbolGenus.CLASS_CONSTRAINED; its super aggregate is Any (set by PopulateConstrainedTypeOrError), so the base enumeration is NOT reachable via the super chain - it is the parameter type of the generated RedSuit(baseEnum) constructor. A constrained type is one-level by design, so a single constructor probe suffices: the first single-argument constructor whose parameter type is an enumeration.

Deliberately not ConstrainedBase, which takes the first single-argument constructor whose parameter is not the type itself: a constrained enumeration also has the base's by-name (String) constructor, so that answer depends on the order the constructors were made in. Was phase 7's EnumTypeHelper.baseEnumOf (no-statics lane S3, 2026-10-29).