Record Class TextVariantTable
java.lang.Object
java.lang.Record
org.ek9lang.compiler.ir.data.TextVariantTable
- Record Components:
baseFqn- the fully qualified name of the abstract base textvariants- one per language, sorted by language
public record TextVariantTable(String baseFqn, List<TextVariantTable.Variant> variants)
extends Record
The locale variants of a text, carried on the IR construct of the text's abstract base: THE list a back end lowers
the base's
_textFactory(language) dispatch from - JVM and LLVM alike.
A text's locales may be declared in several source files of one module. The IR is where that is resolved, once: IR generation collects every variant across the module and records them here, sorted by language so every build dispatches in the same order. A back end must read this table and never re-derive the list from a symbol scope - doing that from the scope of one file was front-end audit FE31, where locales declared in any other file were silently unset at runtime.
This is also why the base's generated code depends on its sibling files: an incremental build must treat a change to any file declaring a locale of the text as a change to the base (docs/implementation/ EK9_INCREMENTAL_BUILD_POSITION.md section 4).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOne locale of the text. -
Constructor Summary
ConstructorsConstructorDescriptionTextVariantTable(String baseFqn, List<TextVariantTable.Variant> variants) Validated, and the variants held in language order whatever order they were found in. -
Method Summary
Modifier and TypeMethodDescriptionbaseFqn()Returns the value of thebaseFqnrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.toString()Returns a string representation of this record class.variants()Returns the value of thevariantsrecord component.
-
Constructor Details
-
TextVariantTable
Validated, and the variants held in language order whatever order they were found in.
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
baseFqn
-
variants
-