Record Class BytecodeLocation
java.lang.Object
java.lang.Record
dev.archunitjava.model.BytecodeLocation
public record BytecodeLocation(ClassResourceLocation resource, Optional<SourceFileName> sourceFile, int bytecodeOffset, OptionalInt lineNumber)
extends Record
Exact bytecode evidence location with optional, non-fabricated debug metadata.
-
Constructor Summary
ConstructorsConstructorDescriptionBytecodeLocation(ClassResourceLocation resource, Optional<SourceFileName> sourceFile, int bytecodeOffset, OptionalInt lineNumber) Creates an instance of aBytecodeLocationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebytecodeOffsetrecord component.dependencyEvidence(MemberId ownerMember) Converts this location into graph evidence while retaining absent debug metadata.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.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
-
BytecodeLocation
public BytecodeLocation(ClassResourceLocation resource, Optional<SourceFileName> sourceFile, int bytecodeOffset, OptionalInt lineNumber) Creates an instance of aBytecodeLocationrecord class.- Parameters:
resource- the value for theresourcerecord componentsourceFile- the value for thesourceFilerecord componentbytecodeOffset- the value for thebytecodeOffsetrecord componentlineNumber- the value for thelineNumberrecord component
-
-
Method Details
-
dependencyEvidence
Converts this location into graph evidence while retaining absent debug metadata. -
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. -
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
-
bytecodeOffset
public int bytecodeOffset()Returns the value of thebytecodeOffsetrecord component.- Returns:
- the value of the
bytecodeOffsetrecord component
-
lineNumber
Returns the value of thelineNumberrecord component.- Returns:
- the value of the
lineNumberrecord component
-