Record Class ChainStep

java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase5.lockanalysis.ChainStep
Record Components:
kind - step classification — see StepKind.
stepLocation - source token where this step occurs — navigation target for "jump to this step in source."
contextFunction - the function executing at this step (the "from" for CALL).
stepTarget - the thing being acted on — called function for CALL, lock origin for ENTER, handler function for CROSS_THREAD_BOUNDARY. May be null for steps that don't have a separable target.
contextDescription - pre-rendered prose for one-line display, e.g. "calls AddressSet.includeAddress via SAME_THREAD edge".

public record ChainStep(StepKind kind, IToken stepLocation, ISymbol contextFunction, ISymbol stepTarget, String contextDescription) extends Record
Single step in a DeadlockChain's rationale trace.

Each step carries two navigable references: contextFunction is "where you are" at this step, and stepTarget is "where you're going" or "what you're touching" — the called function for a StepKind.CALL step, the lock origin for an StepKind.ENTER step, etc.

  • Constructor Details

    • ChainStep

      public ChainStep(StepKind kind, IToken stepLocation, ISymbol contextFunction, ISymbol stepTarget, String contextDescription)
      Creates an instance of a ChainStep record class.
      Parameters:
      kind - the value for the kind record component
      stepLocation - the value for the stepLocation record component
      contextFunction - the value for the contextFunction record component
      stepTarget - the value for the stepTarget record component
      contextDescription - the value for the contextDescription 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.
    • kind

      public StepKind kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • stepLocation

      public IToken stepLocation()
      Returns the value of the stepLocation record component.
      Returns:
      the value of the stepLocation record component
    • contextFunction

      public ISymbol contextFunction()
      Returns the value of the contextFunction record component.
      Returns:
      the value of the contextFunction record component
    • stepTarget

      public ISymbol stepTarget()
      Returns the value of the stepTarget record component.
      Returns:
      the value of the stepTarget record component
    • contextDescription

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