Class OwnProperty

java.lang.Object
org.ek9lang.compiler.support.OwnProperty

public final class OwnProperty extends Object
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:
  • isPropertyOf(ISymbol, IAggregateSymbol) - SYMBOL identity against aggregate.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.define marks them so) but they live in its capture scope, not in getProperties().
  • accessedDirectly(EK9Parser.ObjectAccessExpressionContext, Predicate) - the PARSE form this.prop (or alias.prop when 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).