Record Class StringConcatRewriter.ChainRendering

java.lang.Object
java.lang.Record
org.ek9lang.compiler.repair.StringConcatRewriter.ChainRendering
Enclosing class:
StringConcatRewriter

static record StringConcatRewriter.ChainRendering(String rendered, int operandCount, int substitutionCount, String conflictKind, String reason, EK9Parser.ExpressionContext offender, String suggestedRewrite) extends Record
A + chain rendered as a backtick String, or the first operand that cannot be one: set rendered with the operand counts, or conflictKind/reason naming the refusal.
  • Constructor Details

    • ChainRendering

      ChainRendering(String rendered, int operandCount, int substitutionCount, String conflictKind, String reason, EK9Parser.ExpressionContext offender, String suggestedRewrite)
      Creates an instance of a ChainRendering record class.
      Parameters:
      rendered - the value for the rendered record component
      operandCount - the value for the operandCount record component
      substitutionCount - the value for the substitutionCount record component
      conflictKind - the value for the conflictKind record component
      reason - the value for the reason record component
      offender - the value for the offender record component
      suggestedRewrite - the value for the suggestedRewrite record component
  • Method Details

    • refused

      static StringConcatRewriter.ChainRendering refused(String kind, String reason, EK9Parser.ExpressionContext offender, String suggestedRewrite)
    • 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.
    • rendered

      public String rendered()
      Returns the value of the rendered record component.
      Returns:
      the value of the rendered record component
    • operandCount

      public int operandCount()
      Returns the value of the operandCount record component.
      Returns:
      the value of the operandCount record component
    • substitutionCount

      public int substitutionCount()
      Returns the value of the substitutionCount record component.
      Returns:
      the value of the substitutionCount record component
    • conflictKind

      public String conflictKind()
      Returns the value of the conflictKind record component.
      Returns:
      the value of the conflictKind record component
    • reason

      public String reason()
      Returns the value of the reason record component.
      Returns:
      the value of the reason record component
    • offender

      public EK9Parser.ExpressionContext offender()
      Returns the value of the offender record component.
      Returns:
      the value of the offender record component
    • suggestedRewrite

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