Record Class CliRuleConfiguration

java.lang.Object
java.lang.Record
dev.archunitjava.cli.CliRuleConfiguration
All Implemented Interfaces:
Comparable<CliRuleConfiguration>

public record CliRuleConfiguration(String id, CliGraphDomain domain, DependencyRuleMode mode, CliPattern origins, CliPattern targets, SelfDependencyPolicy selfDependencies, ExternalDependencyPolicy externalDependencies, Optional<String> displayName, Optional<String> rationale, List<String> tags, Severity severity) extends Record implements Comparable<CliRuleConfiguration>
Whitelisted declarative configuration for the supported dependency-rule subset.
  • Constructor Details

    • CliRuleConfiguration

      public CliRuleConfiguration(String id, CliGraphDomain domain, DependencyRuleMode mode, CliPattern origins, CliPattern targets, SelfDependencyPolicy selfDependencies, ExternalDependencyPolicy externalDependencies, Optional<String> displayName, Optional<String> rationale, List<String> tags, Severity severity)
      Creates an instance of a CliRuleConfiguration record class.
      Parameters:
      id - the value for the id record component
      domain - the value for the domain record component
      mode - the value for the mode record component
      origins - the value for the origins record component
      targets - the value for the targets record component
      selfDependencies - the value for the selfDependencies record component
      externalDependencies - the value for the externalDependencies record component
      displayName - the value for the displayName record component
      rationale - the value for the rationale record component
      tags - the value for the tags record component
      severity - the value for the severity record component
  • Method Details

    • compareTo

      public int compareTo(CliRuleConfiguration other)
      Specified by:
      compareTo in interface Comparable<CliRuleConfiguration>
    • 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.
    • id

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

      public CliGraphDomain domain()
      Returns the value of the domain record component.
      Returns:
      the value of the domain record component
    • mode

      public DependencyRuleMode mode()
      Returns the value of the mode record component.
      Returns:
      the value of the mode record component
    • origins

      public CliPattern origins()
      Returns the value of the origins record component.
      Returns:
      the value of the origins record component
    • targets

      public CliPattern targets()
      Returns the value of the targets record component.
      Returns:
      the value of the targets record component
    • selfDependencies

      public SelfDependencyPolicy selfDependencies()
      Returns the value of the selfDependencies record component.
      Returns:
      the value of the selfDependencies record component
    • externalDependencies

      public ExternalDependencyPolicy externalDependencies()
      Returns the value of the externalDependencies record component.
      Returns:
      the value of the externalDependencies record component
    • displayName

      public Optional<String> displayName()
      Returns the value of the displayName record component.
      Returns:
      the value of the displayName record component
    • rationale

      public Optional<String> rationale()
      Returns the value of the rationale record component.
      Returns:
      the value of the rationale record component
    • tags

      public List<String> tags()
      Returns the value of the tags record component.
      Returns:
      the value of the tags record component
    • severity

      public Severity severity()
      Returns the value of the severity record component.
      Returns:
      the value of the severity record component