Record Class ClassResourceLocation
java.lang.Object
java.lang.Record
dev.archunitjava.model.ClassResourceLocation
- All Implemented Interfaces:
Comparable<ClassResourceLocation>
public record ClassResourceLocation(ClassFileInput.Kind kind, String container, String entry, int precedence)
extends Record
implements Comparable<ClassResourceLocation>
Safe class-resource provenance that never contains a machine-specific absolute path.
-
Constructor Summary
ConstructorsConstructorDescriptionClassResourceLocation(ClassFileInput.Kind kind, String container, String entry, int precedence) Creates an instance of aClassResourceLocationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(ClassResourceLocation other) Returns the value of thecontainerrecord component.entry()Returns the value of theentryrecord component.final booleanIndicates whether some other object is "equal to" this one.static ClassResourceLocationfrom(ClassFileOrigin origin, int precedence) final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.Stable logical location suitable for graph evidence without embedding an absolute path.intReturns the value of theprecedencerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ClassResourceLocation
public ClassResourceLocation(ClassFileInput.Kind kind, String container, String entry, int precedence) Creates an instance of aClassResourceLocationrecord class.- Parameters:
kind- the value for thekindrecord componentcontainer- the value for thecontainerrecord componententry- the value for theentryrecord componentprecedence- the value for theprecedencerecord component
-
-
Method Details
-
from
-
locationId
Stable logical location suitable for graph evidence without embedding an absolute path. -
compareTo
- Specified by:
compareToin interfaceComparable<ClassResourceLocation>
-
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. -
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
container
Returns the value of thecontainerrecord component.- Returns:
- the value of the
containerrecord component
-
entry
Returns the value of theentryrecord component.- Returns:
- the value of the
entryrecord component
-
precedence
public int precedence()Returns the value of theprecedencerecord component.- Returns:
- the value of the
precedencerecord component
-