Class PropertyOfThis
java.lang.Object
org.ek9lang.compiler.support.sharing.PropertyOfThis
- All Implemented Interfaces:
BiFunction<org.antlr.v4.runtime.tree.ParseTree, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>, ISymbol>
final class PropertyOfThis
extends Object
implements BiFunction<org.antlr.v4.runtime.tree.ParseTree, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>, ISymbol>
THE reading of a property named THROUGH
this where a store or a call chain reaches it (Q2, lane B2,
2026-11-13): the single step this.F as a store target (this.F := p, this.F += p) and
this.F as the start of a call chain (this.F.add(p)) - the same property the bare F names,
so RetainedBy reads both spellings as ObjectSharing.Kind.KEPT_IN_PROPERTY (the two must never be
judged differently, as CallableParameterOccurrences.acceptOwnProperty already insists for a property read).
Over PropertyAccessedDirectly, THE parse half of "own property" (PropertyAccessedDirectly.THIS_RECEIVER).
Null for anything else - a chain through a parameter, a local, a call result or a further property reaches an
object this reading does not follow, which stays ObjectSharing.Kind.ESCAPES. Hold one.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(org.antlr.v4.runtime.tree.ParseTree node, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol> recorded) The propertythis.Fnames whennodeis exactly that single step; null otherwise.(package private) ISymbolstartOf(EK9Parser.ObjectAccessExpressionContext chain, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol> recorded) The property a call chain starts on throughthis-this.F.add(p)'sF, whatever follows it; null when the chain starts anywhere else or its first step is a call.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiFunction
andThen
-
Constructor Details
-
PropertyOfThis
PropertyOfThis()
-
-
Method Details
-
apply
public ISymbol apply(org.antlr.v4.runtime.tree.ParseTree node, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol> recorded) The propertythis.Fnames whennodeis exactly that single step; null otherwise.- Specified by:
applyin interfaceBiFunction<org.antlr.v4.runtime.tree.ParseTree, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>, ISymbol>
-
startOf
ISymbol startOf(EK9Parser.ObjectAccessExpressionContext chain, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol> recorded) The property a call chain starts on throughthis-this.F.add(p)'sF, whatever follows it; null when the chain starts anywhere else or its first step is a call.
-