Class OwnProperty
java.lang.Object
org.ek9lang.compiler.support.OwnProperty
- All Implemented Interfaces:
BiPredicate<ISymbol, IAggregateSymbol>
THE "is this a property of the object whose code is running?" - use it, never re-derive it. Two halves, and a
check that cares about the OBJECT (not just the declaration) needs both:
- this,
test(ISymbol, IAggregateSymbol)- SYMBOL identity againstaggregate.getProperties(): one of this type's OWN declared properties. Never a super's, never a same-named property of another type, and never a capture: a dynamic function's or class's captures are property FIELDS (CaptureScope.definemarks them so) but they live in its capture scope, not ingetProperties(). PropertyAccessedDirectly- the PARSE formthis.prop(oralias.propwhen the caller's receiver test accepts the start): one step from the receiver, never through a further property or a call, which reach another object.
Identity alone cannot tell this.conn from other.conn (same symbol, another object); the form alone
cannot tell a property from a capture. Shared by E08250 (a constructor storing 'this' into its own property is not an
escape) and E08251 (a write to a field of the enclosing aggregate is shared state). It also served the
close statement's ownership checks until that statement was removed (2026-10-06, D4); its
namedOnThis went with it. Extracted 2026-10-05 from two private copies
(SharedStateMutationOutsideLockOrError.isFieldOf, ConstructorThisEscapeOrError.isOwnProperty).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleantest(ISymbol candidate, IAggregateSymbol aggregate) True whencandidateis one ofaggregate's own declared properties - by identity, never by name.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiPredicate
and, negate, or
-
Constructor Details
-
OwnProperty
public OwnProperty()
-
-
Method Details
-
test
True whencandidateis one ofaggregate's own declared properties - by identity, never by name.- Specified by:
testin interfaceBiPredicate<ISymbol, IAggregateSymbol>
-