Class PolymorphicCopySymbolGenerator
java.lang.Object
org.ek9lang.compiler.phase7.synthesis.PolymorphicCopySymbolGenerator
Creates the DETACHED method symbols a copy owner's IR carries for a copy through a super-typed reference
(
PolymorphicCopy, Q5b): the generated _copyAccepts(target as Any) <- Boolean and one
:=: override per inherited :=:(Super) signature.
Like FieldSetStatusSymbolGenerator's carrier, none of them is ever define()d into the
aggregate's scope (F37): they are how the copy is EMITTED, not what the programmer wrote, so method resolution,
the call graph, the editors and every E-code see exactly the program as written. A call through a
Base-typed reference still resolves to Base's :=:; the object then runs the override
(N07). Their bodies come from CopyGenerator.
Every IR generator that builds an aggregate's operations list appends these after its own methods (as it does
the _fieldSetStatus carrier) - all three must, or a Base-typed copy silently copies the Base part only.
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<MethodSymbol> createFor(AggregateSymbol aggregateSymbol, Ek9Types ek9Types) The detached carriers for this aggregate - empty for a still-generic template and for anything that is not a copy owner needing them.
-
Method Details
-
createFor
The detached carriers for this aggregate - empty for a still-generic template and for anything that is not a copy owner needing them.- Parameters:
aggregateSymbol- the aggregate being generatedek9Types- the built-in types (Any,Boolean)- Returns:
- the
_copyAcceptscarrier (when it can be asked) then the:=:overrides
-