Record Class ModulePackageRuleSpec
java.lang.Object
java.lang.Record
dev.archunitjava.rules.ModulePackageRuleSpec
public record ModulePackageRuleSpec(ModuleRuleMode mode, DirectiveQualification qualification, Optional<JavaPattern> targetModule)
extends Record
Exports/opens mode with qualification and optional qualified target matching.
-
Constructor Summary
ConstructorsConstructorDescriptionModulePackageRuleSpec(ModuleRuleMode mode, DirectiveQualification qualification, Optional<JavaPattern> targetModule) Creates an instance of aModulePackageRuleSpecrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.mode()Returns the value of themoderecord component.static ModulePackageRuleSpecno()static ModulePackageRuleSpeconly()Returns the value of thequalificationrecord component.static ModulePackageRuleSpecrequired()targetedTo(JavaPattern value) Returns the value of thetargetModulerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ModulePackageRuleSpec
public ModulePackageRuleSpec(ModuleRuleMode mode, DirectiveQualification qualification, Optional<JavaPattern> targetModule) Creates an instance of aModulePackageRuleSpecrecord class.- Parameters:
mode- the value for themoderecord componentqualification- the value for thequalificationrecord componenttargetModule- the value for thetargetModulerecord component
-
-
Method Details
-
no
-
only
-
required
-
withQualification
-
targetedTo
-
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
-
qualification
Returns the value of thequalificationrecord component.- Returns:
- the value of the
qualificationrecord component
-
targetModule
Returns the value of thetargetModulerecord component.- Returns:
- the value of the
targetModulerecord component
-