Module java.base
Package java.lang

Class Module

java.lang.Object
java.lang.Module
All Implemented Interfaces:
AnnotatedElement

public final classModuleextendsObjectimplementsAnnotatedElement
Represents a run-time module, eithernamed or unnamed.

Named modules have aname and are constructed by the Java Virtual Machine when a graph of modules is defined to the Java virtual machine to create amodule layer.

An unnamed module does not have a name. There is an unnamed module for eachClassLoader, obtained by invoking itsgetUnnamedModule method. All types that are not in a named module are members of their defining class loader's unnamed module.

The package names that are parameters or returned by methods defined in this class are the fully-qualified names of the packages as defined in section6.5.3 ofThe Java Language Specification, for example,"java.lang".

Unless otherwise specified, passing anull argument to a method in this class causes aNullPointerException to be thrown.

SeeJava Language Specification:
7.7 Module Declarations
Since:
9
See Also: