Record Class LockIdentityDescriptor

java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase5.lockanalysis.LockIdentityDescriptor
Record Components:
stableId - wire-form identifier — derived from origin (field FQN, allocation site file:line:col, parameter or capture name). Used as the foreign-key value in other records and as the JSON projection for MCP/IDE consumers.
origin - where the identity originates — see IdentityOrigin.
originSymbol - the ISymbol that owns the identity (field symbol, allocation-site call symbol, parameter symbol, or capture symbol). Navigation target for "jump to where the lock lives."
originLocation - source token for the origin — file/line/col for IDE navigation when originSymbol doesn't carry the precise position.
displayName - human-readable rendering, e.g. "Repository.cache", "MutexLock at Foo.ek9:42:8".

public record LockIdentityDescriptor(String stableId, IdentityOrigin origin, ISymbol originSymbol, IToken originLocation, String displayName) extends Record
Catalogue entry for a single lock identity tracked by the slice-2 deadlock analysis.

A lock identity is the static notion of "which physical MutexLock object" a reference points to. Each distinct identity gets exactly one descriptor in LockAnalysis.identitiesById(). References that statically refer to the same lock (a field on the same instance, an alias chain rooted at one allocation site) share a descriptor.

  • Constructor Details

    • LockIdentityDescriptor

      public LockIdentityDescriptor(String stableId, IdentityOrigin origin, ISymbol originSymbol, IToken originLocation, String displayName)
      Creates an instance of a LockIdentityDescriptor record class.
      Parameters:
      stableId - the value for the stableId record component
      origin - the value for the origin record component
      originSymbol - the value for the originSymbol record component
      originLocation - the value for the originLocation record component
      displayName - the value for the displayName record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • stableId

      public String stableId()
      Returns the value of the stableId record component.
      Returns:
      the value of the stableId record component
    • origin

      public IdentityOrigin origin()
      Returns the value of the origin record component.
      Returns:
      the value of the origin record component
    • originSymbol

      public ISymbol originSymbol()
      Returns the value of the originSymbol record component.
      Returns:
      the value of the originSymbol record component
    • originLocation

      public IToken originLocation()
      Returns the value of the originLocation record component.
      Returns:
      the value of the originLocation record component
    • displayName

      public String displayName()
      Returns the value of the displayName record component.
      Returns:
      the value of the displayName record component