Class IsEnumeration

java.lang.Object
org.ek9lang.compiler.support.IsEnumeration
All Implemented Interfaces:
Predicate<ISymbol>

public final class IsEnumeration extends Object implements Predicate<ISymbol>
THE "is this an enumeration?" - the symbol's genus is SymbolGenus.CLASS_ENUMERATION. Use it, never a hand-written genus comparison (it was written about twenty ways; no-statics lane S3, 2026-10-29).

It asks the GENUS, so it answers for the enumeration type itself and for a symbol that stands for it - an expression naming the type carries the type's genus (ExpressionSymbol). A constrained type over an enumeration (RedSuit as CardSuit constrain as ...) is NOT one: its genus is CLASS_CONSTRAINED; "an enumeration, base or constrained" is IsEnumerationType, built on this. Where only an aggregate will do, a caller keeps its own instanceof IAggregateSymbol test beside this one.

  • Constructor Details

    • IsEnumeration

      public IsEnumeration()
  • Method Details