Record Class JavaPackageOrigin
java.lang.Object
java.lang.Record
dev.archunitjava.model.JavaPackageOrigin
- All Implemented Interfaces:
Comparable<JavaPackageOrigin>
public record JavaPackageOrigin(ClassFileInput.Kind kind, String container, int precedence)
extends Record
implements Comparable<JavaPackageOrigin>
Safe identity of one classpath input contributing to a package.
-
Constructor Summary
ConstructorsConstructorDescriptionJavaPackageOrigin(ClassFileInput.Kind kind, String container, int precedence) Creates an instance of aJavaPackageOriginrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(JavaPackageOrigin other) Returns the value of thecontainerrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.intReturns the value of theprecedencerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
JavaPackageOrigin
Creates an instance of aJavaPackageOriginrecord class.- Parameters:
kind- the value for thekindrecord componentcontainer- the value for thecontainerrecord componentprecedence- the value for theprecedencerecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<JavaPackageOrigin>
-
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
-
precedence
public int precedence()Returns the value of theprecedencerecord component.- Returns:
- the value of the
precedencerecord component
-