Record Class LockPrecedenceGraph.Edge

java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase5.lockanalysis.LockPrecedenceGraph.Edge
Record Components:
outerLockId - stableId of the outer-held lock.
innerLockId - stableId of the lock acquired while outer is held.
innerCallLocation - source token of the inner enter() call site — where the cycle diagnostic should fire.
outerSiteId - stableId of the outer EnterCallSite — lets consumers find the contributing outer-site too.
All Implemented Interfaces:
Serializable
Enclosing class:
LockPrecedenceGraph

public static record LockPrecedenceGraph.Edge(String outerLockId, String innerLockId, IToken innerCallLocation, String outerSiteId) extends Record implements Serializable
One observed nested-enter relationship between two distinct lock identities.
See Also:
  • Constructor Details

    • Edge

      public Edge(String outerLockId, String innerLockId, IToken innerCallLocation, String outerSiteId)
      Creates an instance of a Edge record class.
      Parameters:
      outerLockId - the value for the outerLockId record component
      innerLockId - the value for the innerLockId record component
      innerCallLocation - the value for the innerCallLocation record component
      outerSiteId - the value for the outerSiteId 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.
    • outerLockId

      public String outerLockId()
      Returns the value of the outerLockId record component.
      Returns:
      the value of the outerLockId record component
    • innerLockId

      public String innerLockId()
      Returns the value of the innerLockId record component.
      Returns:
      the value of the innerLockId record component
    • innerCallLocation

      public IToken innerCallLocation()
      Returns the value of the innerCallLocation record component.
      Returns:
      the value of the innerCallLocation record component
    • outerSiteId

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