Module aya.pretty

Record Class PrettyError

java.lang.Object
java.lang.Record
org.aya.pretty.error.PrettyError
All Implemented Interfaces:
Docile

public record PrettyError(@NotNull String filePath, @NotNull Span errorRange, @NotNull Doc brief, @NotNull PrettyError.FormatConfig formatConfig, @NotNull kala.collection.immutable.ImmutableSeq<kala.tuple.Tuple2<Span,Doc>> inlineHints) extends Record implements Docile
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    PrettyError(@NotNull String filePath, @NotNull Span errorRange, @NotNull Doc brief, @NotNull PrettyError.FormatConfig formatConfig, @NotNull kala.collection.immutable.ImmutableSeq<kala.tuple.Tuple2<Span,Doc>> inlineHints)
    Creates an instance of a PrettyError record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull Doc
    Returns the value of the brief record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    @NotNull Span
    Returns the value of the errorRange record component.
    @NotNull String
    Returns the value of the filePath record component.
    Returns the value of the formatConfig record component.
    final int
    Returns a hash code value for this object.
    @NotNull kala.collection.immutable.ImmutableSeq<kala.tuple.Tuple2<Span,Doc>>
    Returns the value of the inlineHints record component.
    @NotNull Doc
     
    @NotNull Doc
    toDoc(@NotNull PrettyErrorConfig config)
     
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PrettyError

      public PrettyError(@NotNull @NotNull String filePath, @NotNull @NotNull Span errorRange, @NotNull @NotNull Doc brief, @NotNull @NotNull PrettyError.FormatConfig formatConfig, @NotNull @NotNull kala.collection.immutable.ImmutableSeq<kala.tuple.Tuple2<Span,Doc>> inlineHints)
      Creates an instance of a PrettyError record class.
      Parameters:
      filePath - the value for the filePath record component
      errorRange - the value for the errorRange record component
      brief - the value for the brief record component
      formatConfig - the value for the formatConfig record component
      inlineHints - the value for the inlineHints record component
  • Method Details

    • toDoc

      @NotNull public @NotNull Doc toDoc(@NotNull @NotNull PrettyErrorConfig config)
    • toDoc

      @NotNull public @NotNull Doc toDoc()
      Specified by:
      toDoc in interface Docile
    • 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.
    • filePath

      @NotNull public @NotNull String filePath()
      Returns the value of the filePath record component.
      Returns:
      the value of the filePath record component
    • errorRange

      @NotNull public @NotNull Span errorRange()
      Returns the value of the errorRange record component.
      Returns:
      the value of the errorRange record component
    • brief

      @NotNull public @NotNull Doc brief()
      Returns the value of the brief record component.
      Returns:
      the value of the brief record component
    • formatConfig

      @NotNull public @NotNull PrettyError.FormatConfig formatConfig()
      Returns the value of the formatConfig record component.
      Returns:
      the value of the formatConfig record component
    • inlineHints

      @NotNull public @NotNull kala.collection.immutable.ImmutableSeq<kala.tuple.Tuple2<Span,Doc>> inlineHints()
      Returns the value of the inlineHints record component.
      Returns:
      the value of the inlineHints record component