Record Class DeclarationLocation
java.lang.Object
java.lang.Record
dev.archunitjava.model.DeclarationLocation
public record DeclarationLocation(ClassResourceLocation resource, Optional<SourceFileName> sourceFile)
extends Record
Resource and optional source-file location for a type or declared member.
-
Constructor Summary
ConstructorsConstructorDescriptionDeclarationLocation(ClassResourceLocation resource, Optional<SourceFileName> sourceFile) Creates an instance of aDeclarationLocationrecord 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.resource()Returns the value of theresourcerecord component.Returns the value of thesourceFilerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DeclarationLocation
Creates an instance of aDeclarationLocationrecord class.- Parameters:
resource- the value for theresourcerecord componentsourceFile- the value for thesourceFilerecord component
-
-
Method Details
-
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). -
resource
Returns the value of theresourcerecord component.- Returns:
- the value of the
resourcerecord component
-
sourceFile
Returns the value of thesourceFilerecord component.- Returns:
- the value of the
sourceFilerecord component
-