Class SharedTypeClosure
java.lang.Object
org.ek9lang.compiler.phase5.SharedTypeClosure
THE closure of the types a value of the root types can reach (EK9_NATIVE_CYCLE_COLLECTOR_DESIGN.md ยง13.11): through
properties (inherited ones included), supers and traits (for what they give it), subtypes of a type a value is
declared as (a reference of a base type may hold any of them - never a super's other subtypes),
type arguments (
List of T), what a method or constructor may KEEP (RetainsArgument - a built-in's
fields are not EK9 properties, so a PriorityQueue reaches its comparator this way), and the captures of
every function or dynamic class a reached value can be. A value typed Any reaches every type: the closure is
then null. Used by ConfinedTypeMarker (the complement of the closure from everything shared, T12) and
RegisteredTypeMarker (the closure from the published roots, F2) - never a second walk.-
Constructor Summary
ConstructorsConstructorDescriptionSharedTypeClosure(ConcreteSubtypeFinder subtypeFinder, Predicate<IAggregateSymbol> keepsOwnDomain) -
Method Summary
Modifier and TypeMethodDescription(package private) voidaddCapturesOf(ISymbol symbol, Collection<ISymbol> into) What the construct captured - never the construct's own type: concurrent code calling a method of a type it made itself does not make that type shared (only what it captures, or reaches through what it captures, does).apply(Collection<? extends ISymbol> roots) The fully qualified names of every type reachable from the roots (the roots included), or null for any type.(package private) ISymbolThe construct whose captures a concurrent entry point reaches: itself, or a method's owner (a dynamic class).
-
Constructor Details
-
SharedTypeClosure
SharedTypeClosure(ConcreteSubtypeFinder subtypeFinder, Predicate<IAggregateSymbol> keepsOwnDomain) - Parameters:
keepsOwnDomain- a type whose type arguments and kept arguments the walk does not enter - aMutexLock's payload is its own domain (T11) for the registered closure; nothing for the confined one, where a payload is as shared as any other value.
-
-
Method Details
-
apply
The fully qualified names of every type reachable from the roots (the roots included), or null for any type. A type a VALUE can be declared as (a root, a property, a type argument, a kept argument, a capture) brings in its subtypes - the value may be any of them; a super or trait reached only to collect what a type inherits does not (a CountingAspect is never an AuditAspect because both extend Aspect - S2c, 2026-11-02). -
addCapturesOf
What the construct captured - never the construct's own type: concurrent code calling a method of a type it made itself does not make that type shared (only what it captures, or reaches through what it captures, does). -
capturer
-