Record Class DocLintConfig

java.lang.Object
java.lang.Record
ch.so.agi.hop.doclint.config.DocLintConfig

public record DocLintConfig(Path repositoryRoot, Path docsDirectory, Path examplesDirectory, boolean requireKeywords, boolean requireDocumentation, boolean requireExamples) extends Record
Resolved DocLint settings for one Maven project.

Directories default to the top-level Maven project because docs/ and examples/ live next to the aggregator POM, not inside a plugin module.

  • Constructor Summary

    Constructors
    Constructor
    Description
    DocLintConfig(Path repositoryRoot, Path docsDirectory, Path examplesDirectory, boolean requireKeywords, boolean requireDocumentation, boolean requireExamples)
    Creates an instance of a DocLintConfig record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    display(Path path)
    Renders a path relative to the repository root when possible, for stable messages.
    Returns the value of the docsDirectory record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the examplesDirectory record component.
    final int
    Returns a hash code value for this object.
    Returns the value of the repositoryRoot record component.
    boolean
    Returns the value of the requireDocumentation record component.
    boolean
    Returns the value of the requireExamples record component.
    boolean
    Returns the value of the requireKeywords record component.
    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

    • DocLintConfig

      public DocLintConfig(Path repositoryRoot, Path docsDirectory, Path examplesDirectory, boolean requireKeywords, boolean requireDocumentation, boolean requireExamples)
      Creates an instance of a DocLintConfig record class.
      Parameters:
      repositoryRoot - the value for the repositoryRoot record component
      docsDirectory - the value for the docsDirectory record component
      examplesDirectory - the value for the examplesDirectory record component
      requireKeywords - the value for the requireKeywords record component
      requireDocumentation - the value for the requireDocumentation record component
      requireExamples - the value for the requireExamples record component
  • Method Details

    • display

      public String display(Path path)
      Renders a path relative to the repository root when possible, for stable messages.
    • 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 '=='.
      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.
    • repositoryRoot

      public Path repositoryRoot()
      Returns the value of the repositoryRoot record component.
      Returns:
      the value of the repositoryRoot record component
    • docsDirectory

      public Path docsDirectory()
      Returns the value of the docsDirectory record component.
      Returns:
      the value of the docsDirectory record component
    • examplesDirectory

      public Path examplesDirectory()
      Returns the value of the examplesDirectory record component.
      Returns:
      the value of the examplesDirectory record component
    • requireKeywords

      public boolean requireKeywords()
      Returns the value of the requireKeywords record component.
      Returns:
      the value of the requireKeywords record component
    • requireDocumentation

      public boolean requireDocumentation()
      Returns the value of the requireDocumentation record component.
      Returns:
      the value of the requireDocumentation record component
    • requireExamples

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