Record Class DependencyEvidence
java.lang.Object
java.lang.Record
dev.archunitjava.graph.DependencyEvidence
- All Implemented Interfaces:
Comparable<DependencyEvidence>
public record DependencyEvidence(LocationId location, Optional<MemberId> ownerMember, OptionalInt bytecodeOffset, Optional<String> sourceFile, OptionalInt lineNumber)
extends Record
implements Comparable<DependencyEvidence>
Provenance for one observed dependency. Missing bytecode metadata remains explicit.
-
Constructor Summary
ConstructorsConstructorDescriptionDependencyEvidence(LocationId location, Optional<MemberId> ownerMember, OptionalInt bytecodeOffset, Optional<String> sourceFile, OptionalInt lineNumber) Creates an instance of aDependencyEvidencerecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic DependencyEvidenceat(LocationId location) static DependencyEvidenceat(LocationId location, MemberId ownerMember, int bytecodeOffset, int lineNumber) static DependencyEvidenceat(LocationId location, MemberId ownerMember, int bytecodeOffset, String sourceFile, int lineNumber) Returns the value of thebytecodeOffsetrecord component.intcompareTo(DependencyEvidence other) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelineNumberrecord component.location()Returns the value of thelocationrecord component.Returns the value of theownerMemberrecord component.Returns the value of thesourceFilerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DependencyEvidence
public DependencyEvidence(LocationId location, Optional<MemberId> ownerMember, OptionalInt bytecodeOffset, Optional<String> sourceFile, OptionalInt lineNumber) Creates an instance of aDependencyEvidencerecord class.- Parameters:
location- the value for thelocationrecord componentownerMember- the value for theownerMemberrecord componentbytecodeOffset- the value for thebytecodeOffsetrecord componentsourceFile- the value for thesourceFilerecord componentlineNumber- the value for thelineNumberrecord component
-
-
Method Details
-
at
-
at
public static DependencyEvidence at(LocationId location, MemberId ownerMember, int bytecodeOffset, int lineNumber) -
at
public static DependencyEvidence at(LocationId location, MemberId ownerMember, int bytecodeOffset, String sourceFile, int lineNumber) -
compareTo
- Specified by:
compareToin interfaceComparable<DependencyEvidence>
-
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). -
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
ownerMember
-
bytecodeOffset
Returns the value of thebytecodeOffsetrecord component.- Returns:
- the value of the
bytecodeOffsetrecord component
-
sourceFile
-
lineNumber
Returns the value of thelineNumberrecord component.- Returns:
- the value of the
lineNumberrecord component
-