Record Class JavaPackage
java.lang.Object
java.lang.Record
dev.archunitjava.model.JavaPackage
- All Implemented Interfaces:
Comparable<JavaPackage>
public record JavaPackage(JavaPackageName name, List<JavaType> types, List<JavaType> packageInfoTypes, List<JavaAnnotationOccurrence> annotations, List<JavaPackageOrigin> origins)
extends Record
implements Comparable<JavaPackage>
Aggregated Java package with metadata carriers separated from ordinary types.
-
Constructor Summary
ConstructorsConstructorDescriptionJavaPackage(JavaPackageName name, List<JavaType> types, List<JavaType> packageInfoTypes, List<JavaAnnotationOccurrence> annotations, List<JavaPackageOrigin> origins) Creates an instance of aJavaPackagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationsrecord component.intcompareTo(JavaPackage other) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanname()Returns the value of thenamerecord component.origins()Returns the value of theoriginsrecord component.Returns the value of thepackageInfoTypesrecord component.final StringtoString()Returns a string representation of this record class.types()Returns the value of thetypesrecord component.
-
Constructor Details
-
JavaPackage
public JavaPackage(JavaPackageName name, List<JavaType> types, List<JavaType> packageInfoTypes, List<JavaAnnotationOccurrence> annotations, List<JavaPackageOrigin> origins) Creates an instance of aJavaPackagerecord class.- Parameters:
name- the value for thenamerecord componenttypes- the value for thetypesrecord componentpackageInfoTypes- the value for thepackageInfoTypesrecord componentannotations- the value for theannotationsrecord componentorigins- the value for theoriginsrecord component
-
-
Method Details
-
isSplitAcrossOrigins
public boolean isSplitAcrossOrigins() -
packageInfoType
-
compareTo
- Specified by:
compareToin interfaceComparable<JavaPackage>
-
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). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
types
-
packageInfoTypes
-
annotations
Returns the value of theannotationsrecord component.- Returns:
- the value of the
annotationsrecord component
-
origins
Returns the value of theoriginsrecord component.- Returns:
- the value of the
originsrecord component
-