Record Class ImportOptions
java.lang.Object
java.lang.Record
dev.archunitjava.importer.ImportOptions
public record ImportOptions(ImportScope scope, List<ImportResourceRule> rules, boolean readArchIgnore, int maximumIgnoreBytes, int maximumIgnoreLines)
extends Record
Immutable import semantics shared by directory and archive inputs.
The scope is a hard boundary. Within it resources are included initially, then root
.archignore rules are applied in file order, followed by configured rules in list order.
The last matching rule wins; a leading ! in .archignore is an include rule.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionImportOptions(ImportScope scope, List<ImportResourceRule> rules, boolean readArchIgnore, int maximumIgnoreBytes, int maximumIgnoreLines) Creates an instance of aImportOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImportOptionsdefaults()final booleanIndicates whether some other object is "equal to" this one.Stable material suitable for inclusion in cache keys.final inthashCode()Returns a hash code value for this object.intReturns the value of themaximumIgnoreBytesrecord component.intReturns the value of themaximumIgnoreLinesrecord component.booleanReturns the value of thereadArchIgnorerecord component.rules()Returns the value of therulesrecord component.scope()Returns the value of thescoperecord component.final StringtoString()Returns a string representation of this record class.withRule(ImportResourceRule value) withScope(ImportScope value)
-
Field Details
-
DEFAULT_MAXIMUM_IGNORE_BYTES
public static final int DEFAULT_MAXIMUM_IGNORE_BYTES- See Also:
-
DEFAULT_MAXIMUM_IGNORE_LINES
public static final int DEFAULT_MAXIMUM_IGNORE_LINES- See Also:
-
-
Constructor Details
-
ImportOptions
public ImportOptions(ImportScope scope, List<ImportResourceRule> rules, boolean readArchIgnore, int maximumIgnoreBytes, int maximumIgnoreLines) Creates an instance of aImportOptionsrecord class.- Parameters:
scope- the value for thescoperecord componentrules- the value for therulesrecord componentreadArchIgnore- the value for thereadArchIgnorerecord componentmaximumIgnoreBytes- the value for themaximumIgnoreBytesrecord componentmaximumIgnoreLines- the value for themaximumIgnoreLinesrecord component
-
-
Method Details
-
defaults
-
withScope
-
withRule
-
withoutArchIgnore
-
fingerprintMaterial
Stable material suitable for inclusion in cache keys. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
scope
Returns the value of thescoperecord component.- Returns:
- the value of the
scoperecord component
-
rules
Returns the value of therulesrecord component.- Returns:
- the value of the
rulesrecord component
-
readArchIgnore
public boolean readArchIgnore()Returns the value of thereadArchIgnorerecord component.- Returns:
- the value of the
readArchIgnorerecord component
-
maximumIgnoreBytes
public int maximumIgnoreBytes()Returns the value of themaximumIgnoreBytesrecord component.- Returns:
- the value of the
maximumIgnoreBytesrecord component
-
maximumIgnoreLines
public int maximumIgnoreLines()Returns the value of themaximumIgnoreLinesrecord component.- Returns:
- the value of the
maximumIgnoreLinesrecord component
-