java.lang.Object
java.lang.Record
com.puppycrawl.tools.checkstyle.checks.javadoc.utils.TagInfo
Record Components:
name - Name of the tag ("link", "see", etc)
value - Value of the tag
position - Position of the tag in the given comment

public record TagInfo(String name, String value, LineColumn position) extends Record
Value object for storing data about a parsed tag.
  • Field Details

  • Constructor Details

    • TagInfo

      public TagInfo(String name, String value, LineColumn position)
      Creates an instance of a TagInfo record class.
      Parameters:
      name - the value for the name record component
      value - the value for the value record component
      position - the value for the position record component
  • Method Details

    • getName

      public String getName()
      Legacy getter for tag name (backward compatibility).
    • getValue

      public String getValue()
      Legacy getter for tag value (backward compatibility).
    • getPosition

      Legacy getter for tag position (backward compatibility).
    • 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.
    • name

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

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

      public LineColumn position()
      Returns the value of the position record component.
      Returns:
      the value of the position record component