Record Class CliConfiguration

java.lang.Object
java.lang.Record
dev.archunitjava.cli.CliConfiguration

public record CliConfiguration(Path approvedRoot, Path source, List<Path> inputs, List<CliRuleConfiguration> rules, CheckOptions checkOptions, CliResultFormat resultFormat, CliGraphFormat graphFormat, CliGraphDomain graphDomain) extends Record
Fully validated, immutable CLI configuration with resolved approved inputs.
  • Field Details

  • Constructor Details

    • CliConfiguration

      public CliConfiguration(Path approvedRoot, Path source, List<Path> inputs, List<CliRuleConfiguration> rules, CheckOptions checkOptions, CliResultFormat resultFormat, CliGraphFormat graphFormat, CliGraphDomain graphDomain)
      Creates an instance of a CliConfiguration record class.
      Parameters:
      approvedRoot - the value for the approvedRoot record component
      source - the value for the source record component
      inputs - the value for the inputs record component
      rules - the value for the rules record component
      checkOptions - the value for the checkOptions record component
      resultFormat - the value for the resultFormat record component
      graphFormat - the value for the graphFormat record component
      graphDomain - the value for the graphDomain record component
  • Method Details

    • withResultFormat

      public CliConfiguration withResultFormat(CliResultFormat value)
    • withGraphFormat

      public CliConfiguration withGraphFormat(CliGraphFormat value)
    • 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.
    • approvedRoot

      public Path approvedRoot()
      Returns the value of the approvedRoot record component.
      Returns:
      the value of the approvedRoot record component
    • source

      public Path source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component
    • inputs

      public List<Path> inputs()
      Returns the value of the inputs record component.
      Returns:
      the value of the inputs record component
    • rules

      public List<CliRuleConfiguration> rules()
      Returns the value of the rules record component.
      Returns:
      the value of the rules record component
    • checkOptions

      public CheckOptions checkOptions()
      Returns the value of the checkOptions record component.
      Returns:
      the value of the checkOptions record component
    • resultFormat

      public CliResultFormat resultFormat()
      Returns the value of the resultFormat record component.
      Returns:
      the value of the resultFormat record component
    • graphFormat

      public CliGraphFormat graphFormat()
      Returns the value of the graphFormat record component.
      Returns:
      the value of the graphFormat record component
    • graphDomain

      public CliGraphDomain graphDomain()
      Returns the value of the graphDomain record component.
      Returns:
      the value of the graphDomain record component