Record Class ListLiteralDetails

java.lang.Object
java.lang.Record
org.ek9lang.compiler.ir.data.ListLiteralDetails
Record Components:
collectionTypeFqn - Parameterized list type FQN (e.g., "org.ek9.lang::_List_HASH")
elementTypeFqn - Element type FQN for method signatures (e.g., "org.ek9.lang::String")
elementTemps - Temp variable names holding evaluated elements in order
elementCount - Compile-time known element count for pre-sizing
scopeId - Memory management scope for element cleanup

public record ListLiteralDetails(String collectionTypeFqn, String elementTypeFqn, List<String> elementTemps, int elementCount, String scopeId) extends Record
Details for the LIST_LITERAL IR instruction.

Contains compile-time known information for optimal list construction. Backends use element count for pre-sized allocation (JVM ArrayList(N), LLVM single allocation) and element temps for bulk population.

  • Constructor Details

    • ListLiteralDetails

      public ListLiteralDetails(String collectionTypeFqn, String elementTypeFqn, List<String> elementTemps, int elementCount, String scopeId)
      Create list literal details with validation.
  • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • collectionTypeFqn

      public String collectionTypeFqn()
      Returns the value of the collectionTypeFqn record component.
      Returns:
      the value of the collectionTypeFqn record component
    • elementTypeFqn

      public String elementTypeFqn()
      Returns the value of the elementTypeFqn record component.
      Returns:
      the value of the elementTypeFqn record component
    • elementTemps

      public List<String> elementTemps()
      Returns the value of the elementTemps record component.
      Returns:
      the value of the elementTemps record component
    • elementCount

      public int elementCount()
      Returns the value of the elementCount record component.
      Returns:
      the value of the elementCount record component
    • scopeId

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