Record Class DependencyRuleSpec
java.lang.Object
java.lang.Record
dev.archunitjava.rules.DependencyRuleSpec
public record DependencyRuleSpec(DependencyRuleMode mode, SelfDependencyPolicy selfDependencies, ExternalDependencyPolicy externalDependencies)
extends Record
Immutable dependency mood and edge-boundary policies.
-
Constructor Summary
ConstructorsConstructorDescriptionDependencyRuleSpec(DependencyRuleMode mode, SelfDependencyPolicy selfDependencies, ExternalDependencyPolicy externalDependencies) Creates an instance of aDependencyRuleSpecrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic DependencyRuleSpecfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theexternalDependenciesrecord component.final inthashCode()Returns a hash code value for this object.mode()Returns the value of themoderecord component.static DependencyRuleSpecstatic DependencyRuleSpecstatic DependencyRuleSpecReturns the value of theselfDependenciesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DependencyRuleSpec
public DependencyRuleSpec(DependencyRuleMode mode, SelfDependencyPolicy selfDependencies, ExternalDependencyPolicy externalDependencies) Creates an instance of aDependencyRuleSpecrecord class.- Parameters:
mode- the value for themoderecord componentselfDependencies- the value for theselfDependenciesrecord componentexternalDependencies- the value for theexternalDependenciesrecord component
-
-
Method Details
-
noDependencies
-
onlyDependencies
-
anyDependency
-
requiredDependency
-
withSelfDependencies
-
withExternalDependencies
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
mode
Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-
selfDependencies
Returns the value of theselfDependenciesrecord component.- Returns:
- the value of the
selfDependenciesrecord component
-
externalDependencies
Returns the value of theexternalDependenciesrecord component.- Returns:
- the value of the
externalDependenciesrecord component
-