Record Class DeclarationDependency
java.lang.Object
java.lang.Record
dev.archunitjava.model.DeclarationDependency
- All Implemented Interfaces:
Comparable<DeclarationDependency>
public record DeclarationDependency(JavaTypeName origin, JvmReferenceType target, DeclarationDependencyEvidenceKind evidenceKind, boolean selfDependency, boolean externalTarget, List<DeclarationDependencySource> sources)
extends Record
implements Comparable<DeclarationDependency>
One type dependency with every duplicate-free declaration source that supports it.
-
Constructor Summary
ConstructorsConstructorDescriptionDeclarationDependency(JavaTypeName origin, JvmReferenceType target, DeclarationDependencyEvidenceKind evidenceKind, boolean selfDependency, boolean externalTarget, List<DeclarationDependencySource> sources) Creates an instance of aDeclarationDependencyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(DeclarationDependency other) final booleanIndicates whether some other object is "equal to" this one.Returns the value of theevidenceKindrecord component.booleanReturns the value of theexternalTargetrecord component.final inthashCode()Returns a hash code value for this object.origin()Returns the value of theoriginrecord component.booleanReturns the value of theselfDependencyrecord component.sources()Returns the value of thesourcesrecord component.target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DeclarationDependency
public DeclarationDependency(JavaTypeName origin, JvmReferenceType target, DeclarationDependencyEvidenceKind evidenceKind, boolean selfDependency, boolean externalTarget, List<DeclarationDependencySource> sources) Creates an instance of aDeclarationDependencyrecord class.- Parameters:
origin- the value for theoriginrecord componenttarget- the value for thetargetrecord componentevidenceKind- the value for theevidenceKindrecord componentselfDependency- the value for theselfDependencyrecord componentexternalTarget- the value for theexternalTargetrecord componentsources- the value for thesourcesrecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<DeclarationDependency>
-
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. -
origin
Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-
evidenceKind
Returns the value of theevidenceKindrecord component.- Returns:
- the value of the
evidenceKindrecord component
-
selfDependency
public boolean selfDependency()Returns the value of theselfDependencyrecord component.- Returns:
- the value of the
selfDependencyrecord component
-
externalTarget
public boolean externalTarget()Returns the value of theexternalTargetrecord component.- Returns:
- the value of the
externalTargetrecord component
-
sources
Returns the value of thesourcesrecord component.- Returns:
- the value of the
sourcesrecord component
-