Record Class CycleRuleOptions

java.lang.Object
java.lang.Record
dev.archunitjava.rules.CycleRuleOptions

public record CycleRuleOptions(Set<DependencyKind> includedKinds, TypeUseDependencyPolicy typeUseDependencies, SyntheticEdgePolicy syntheticEdges, int maximumRepresentativeLength, long maximumTraversedEdgesPerComponent, int maximumEvidenceEntries) extends Record
Explicit dependency semantics and output bounds for type and package cycle rules.
  • Constructor Details

    • CycleRuleOptions

      public CycleRuleOptions(Set<DependencyKind> includedKinds, TypeUseDependencyPolicy typeUseDependencies, SyntheticEdgePolicy syntheticEdges, int maximumRepresentativeLength, long maximumTraversedEdgesPerComponent, int maximumEvidenceEntries)
      Creates an instance of a CycleRuleOptions record class.
      Parameters:
      includedKinds - the value for the includedKinds record component
      typeUseDependencies - the value for the typeUseDependencies record component
      syntheticEdges - the value for the syntheticEdges record component
      maximumRepresentativeLength - the value for the maximumRepresentativeLength record component
      maximumTraversedEdgesPerComponent - the value for the maximumTraversedEdgesPerComponent record component
      maximumEvidenceEntries - the value for the maximumEvidenceEntries record component
  • Method Details

    • defaults

      public static CycleRuleOptions defaults()
    • includingOnly

      public CycleRuleOptions includingOnly(Set<DependencyKind> kinds)
    • withTypeUseDependencies

      public CycleRuleOptions withTypeUseDependencies(TypeUseDependencyPolicy policy)
    • withSyntheticEdges

      public CycleRuleOptions withSyntheticEdges(SyntheticEdgePolicy policy)
    • withBounds

      public CycleRuleOptions withBounds(int representativeLength, long traversedEdgesPerComponent, int evidenceEntries)
    • 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 the compare method from their corresponding wrapper classes.
      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.
    • includedKinds

      public Set<DependencyKind> includedKinds()
      Returns the value of the includedKinds record component.
      Returns:
      the value of the includedKinds record component
    • typeUseDependencies

      public TypeUseDependencyPolicy typeUseDependencies()
      Returns the value of the typeUseDependencies record component.
      Returns:
      the value of the typeUseDependencies record component
    • syntheticEdges

      public SyntheticEdgePolicy syntheticEdges()
      Returns the value of the syntheticEdges record component.
      Returns:
      the value of the syntheticEdges record component
    • maximumRepresentativeLength

      public int maximumRepresentativeLength()
      Returns the value of the maximumRepresentativeLength record component.
      Returns:
      the value of the maximumRepresentativeLength record component
    • maximumTraversedEdgesPerComponent

      public long maximumTraversedEdgesPerComponent()
      Returns the value of the maximumTraversedEdgesPerComponent record component.
      Returns:
      the value of the maximumTraversedEdgesPerComponent record component
    • maximumEvidenceEntries

      public int maximumEvidenceEntries()
      Returns the value of the maximumEvidenceEntries record component.
      Returns:
      the value of the maximumEvidenceEntries record component