Record Class JavaModule
java.lang.Object
java.lang.Record
dev.archunitjava.model.JavaModule
- All Implemented Interfaces:
Comparable<JavaModule>
public record JavaModule(JavaModuleIdentity identity, int flags, Optional<String> version, List<JavaModuleRequire> requires, List<JavaModulePackageDirective> exports, List<JavaModulePackageDirective> opens, List<JvmReferenceType> uses, List<JavaModuleProvide> provides, DeclarationLocation location)
extends Record
implements Comparable<JavaModule>
Immutable module identity and its explicit, unresolved JPMS directives.
-
Constructor Summary
ConstructorsConstructorDescriptionJavaModule(JavaModuleIdentity identity, int flags, Optional<String> version, List<JavaModuleRequire> requires, List<JavaModulePackageDirective> exports, List<JavaModulePackageDirective> opens, List<JvmReferenceType> uses, List<JavaModuleProvide> provides, DeclarationLocation location) Creates an instance of aJavaModulerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(JavaModule other) final booleanIndicates whether some other object is "equal to" this one.exports()Returns the value of theexportsrecord component.intflags()Returns the value of theflagsrecord component.final inthashCode()Returns a hash code value for this object.identity()Returns the value of theidentityrecord component.location()Returns the value of thelocationrecord component.booleanopen()opens()Returns the value of theopensrecord component.provides()Returns the value of theprovidesrecord component.requires()Returns the value of therequiresrecord component.final StringtoString()Returns a string representation of this record class.uses()Returns the value of theusesrecord component.version()Returns the value of theversionrecord component.
-
Constructor Details
-
JavaModule
public JavaModule(JavaModuleIdentity identity, int flags, Optional<String> version, List<JavaModuleRequire> requires, List<JavaModulePackageDirective> exports, List<JavaModulePackageDirective> opens, List<JvmReferenceType> uses, List<JavaModuleProvide> provides, DeclarationLocation location) Creates an instance of aJavaModulerecord class.- Parameters:
identity- the value for theidentityrecord componentflags- the value for theflagsrecord componentversion- the value for theversionrecord componentrequires- the value for therequiresrecord componentexports- the value for theexportsrecord componentopens- the value for theopensrecord componentuses- the value for theusesrecord componentprovides- the value for theprovidesrecord componentlocation- the value for thelocationrecord component
-
-
Method Details
-
open
public boolean open() -
compareTo
- Specified by:
compareToin interfaceComparable<JavaModule>
-
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. -
identity
Returns the value of theidentityrecord component.- Returns:
- the value of the
identityrecord component
-
flags
public int flags()Returns the value of theflagsrecord component.- Returns:
- the value of the
flagsrecord component
-
version
-
requires
Returns the value of therequiresrecord component.- Returns:
- the value of the
requiresrecord component
-
exports
Returns the value of theexportsrecord component.- Returns:
- the value of the
exportsrecord component
-
opens
Returns the value of theopensrecord component.- Returns:
- the value of the
opensrecord component
-
uses
Returns the value of theusesrecord component.- Returns:
- the value of the
usesrecord component
-
provides
Returns the value of theprovidesrecord component.- Returns:
- the value of the
providesrecord component
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-