Record Class UnaryOperatorParams

java.lang.Object
java.lang.Record
org.ek9lang.compiler.phase7.support.UnaryOperatorParams
Record Components:
operand - Variable name holding the operand
operator - Operator method name (e.g., "++", "--", "_neg")
operandType - Type of the operand
resultType - Expected result type
resultTemp - Variable name to store result
scopeId - Scope ID for memory management
debugInfo - Debug information for instructions

public record UnaryOperatorParams(String operand, String operator, ISymbol operandType, ISymbol resultType, String resultTemp, String scopeId, DebugInfo debugInfo) extends Record
Parameters for unary operator invocation.

Encapsulates all data needed to invoke a unary operator with proper memory management and type resolution.

  • Constructor Details

    • UnaryOperatorParams

      public UnaryOperatorParams(String operand, String operator, ISymbol operandType, ISymbol resultType, String resultTemp, String scopeId, DebugInfo debugInfo)
      Creates an instance of a UnaryOperatorParams record class.
      Parameters:
      operand - the value for the operand record component
      operator - the value for the operator record component
      operandType - the value for the operandType record component
      resultType - the value for the resultType record component
      resultTemp - the value for the resultTemp record component
      scopeId - the value for the scopeId record component
      debugInfo - the value for the debugInfo 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.
    • operand

      public String operand()
      Returns the value of the operand record component.
      Returns:
      the value of the operand record component
    • operator

      public String operator()
      Returns the value of the operator record component.
      Returns:
      the value of the operator record component
    • operandType

      public ISymbol operandType()
      Returns the value of the operandType record component.
      Returns:
      the value of the operandType record component
    • resultType

      public ISymbol resultType()
      Returns the value of the resultType record component.
      Returns:
      the value of the resultType record component
    • resultTemp

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

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

      public DebugInfo debugInfo()
      Returns the value of the debugInfo record component.
      Returns:
      the value of the debugInfo record component