Record Class SourceDocumentId
java.lang.Object
java.lang.Record
dev.archunitjava.metrics.SourceDocumentId
- All Implemented Interfaces:
StableId, Comparable<StableId>
public record SourceDocumentId(JavaPackageName packageName, SourceFileName fileName)
extends Record
implements StableId
Package-qualified source identity; a bare SourceFile attribute is never treated as a path.
-
Constructor Summary
ConstructorsConstructorDescriptionSourceDocumentId(JavaPackageName packageName, SourceFileName fileName) Creates an instance of aSourceDocumentIdrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.fileName()Returns the value of thefileNamerecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thepackageNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SourceDocumentId
Creates an instance of aSourceDocumentIdrecord class.- Parameters:
packageName- the value for thepackageNamerecord componentfileName- the value for thefileNamerecord component
-
-
Method Details
-
stableKey
-
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). -
packageName
Returns the value of thepackageNamerecord component.- Returns:
- the value of the
packageNamerecord component
-
fileName
Returns the value of thefileNamerecord component.- Returns:
- the value of the
fileNamerecord component
-