Record Class ForRangePolymorphicInstr.ScopeMetadata

java.lang.Object
java.lang.Record
org.ek9lang.compiler.ir.instructions.ForRangePolymorphicInstr.ScopeMetadata
Record Components:
outerScopeId - Outer scope for guards (future use)
loopScopeId - Loop control structure scope
bodyScopeId - Per-iteration body execution scope
Enclosing class:
ForRangePolymorphicInstr

public static record ForRangePolymorphicInstr.ScopeMetadata(String outerScopeId, String loopScopeId, String bodyScopeId) extends Record
Scope identifiers for different parts of the loop structure.

Scope hierarchy: - Outer scope: Guards and loop setup - Loop scope: Whole loop control structure - Body scope: Per-iteration scope for body execution

  • Constructor Details

    • ScopeMetadata

      public ScopeMetadata(String outerScopeId, String loopScopeId, String bodyScopeId)
      Creates an instance of a ScopeMetadata record class.
      Parameters:
      outerScopeId - the value for the outerScopeId record component
      loopScopeId - the value for the loopScopeId record component
      bodyScopeId - the value for the bodyScopeId 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.
    • outerScopeId

      public String outerScopeId()
      Returns the value of the outerScopeId record component.
      Returns:
      the value of the outerScopeId record component
    • loopScopeId

      public String loopScopeId()
      Returns the value of the loopScopeId record component.
      Returns:
      the value of the loopScopeId record component
    • bodyScopeId

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