Class GeneratedOperatorFields
java.lang.Object
org.ek9lang.compiler.support.GeneratedOperatorFields
THE fields a generated operator (
?, $, $$, ==, <=>, #?,
_fieldSetStatus) walks for one aggregate: its OWN properties, then the variables a dynamic class
captured (each becomes a field). Inherited fields are not here - a generated operator reaches them by calling the
super's operator.
Shared by phase 7 synthesis (AbstractSyntheticGenerator.getSyntheticFields) and the phase-5
property-cycle pass (PropertyTypeGraph), so the decision to guard a type and the code that recurses
through its fields are read from the same set and cannot disagree.
anyIncludingInherited(IAggregateSymbol) is THE "has fields, counting inherited ones" predicate (Steve, 2026-10-07,
Q-COMPONENT-?): it decides both whether a type is set merely by being present (phase 2's synthesised '?',
FieldlessIsSet) and whether a super contributes to a generated '$' / '$$' (phase 7,
AbstractSyntheticGenerator.superContributesRepresentation, defect 7). Use it - never a second walk.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleananyIncludingInherited(IAggregateSymbol aggregateSymbol) THE "does this type have any fields, counting inherited ones?": its own fields (of(AggregateSymbol)- properties and a dynamic class's captures) or any property of a super, all the way up.of(AggregateSymbol aggregateSymbol) The aggregate's own properties followed by its captured variables, in declaration order.
-
Method Details
-
of
The aggregate's own properties followed by its captured variables, in declaration order. -
anyIncludingInherited
THE "does this type have any fields, counting inherited ones?": its own fields (of(AggregateSymbol)- properties and a dynamic class's captures) or any property of a super, all the way up. Traits hold no properties. Defensive against a broken hierarchy (a loop is reported by TYPE_HIERARCHY_CHECKS, which may not have run yet).
-