Record Class CallProcessingDetails

java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase7.calls.CallProcessingDetails

public record CallProcessingDetails(EK9Parser.CallContext callContext, VariableDetails variableDetails, boolean isStatementContext) extends Record
Details required for processing function calls in a context-aware manner. Provides necessary information for both statement and expression contexts.
  • Constructor Details

    • CallProcessingDetails

      public CallProcessingDetails(EK9Parser.CallContext callContext, VariableDetails variableDetails, boolean isStatementContext)
      Creates an instance of a CallProcessingDetails record class.
      Parameters:
      callContext - the value for the callContext record component
      variableDetails - the value for the variableDetails record component
      isStatementContext - the value for the isStatementContext record component
  • Method Details

    • forStatement

      public static CallProcessingDetails forStatement(EK9Parser.CallContext callContext, VariableDetails variableDetails)
      Create processing details for statement context (full memory management).
    • forExpression

      public static CallProcessingDetails forExpression(EK9Parser.CallContext callContext, VariableDetails variableDetails)
      Create processing details for expression context (minimal memory management).
    • scopeId

      public String scopeId()
      Get the scope ID for this call processing.
    • resultVariable

      public String resultVariable()
      Get the result variable for this call.
    • 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.
    • callContext

      public EK9Parser.CallContext callContext()
      Returns the value of the callContext record component.
      Returns:
      the value of the callContext record component
    • variableDetails

      public VariableDetails variableDetails()
      Returns the value of the variableDetails record component.
      Returns:
      the value of the variableDetails record component
    • isStatementContext

      public boolean isStatementContext()
      Returns the value of the isStatementContext record component.
      Returns:
      the value of the isStatementContext record component