Class ModuleSystemNotes
java.lang.Object
net.jrodolfo.java_evolution.java09.ModuleSystemNotes
Explains the Java Platform Module System (JPMS), introduced in Java 9.
Before Java 9, Java applications were primarily organized with the classpath. The classpath could not express strong module boundaries, so code could accidentally depend on internals and the JDK itself was difficult to divide into smaller, well-defined pieces.
The module system solves this with explicit module descriptors. A real
modular application normally contains a module-info.java file at the
root of a source set. This Spring Boot reference project intentionally does
not become a modular application yet, because the goal is to keep each
feature example small and independent.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExplains theexportsdirective.Shows the shape of a minimal module declaration.Explains why this project is not modularized at this stage.Explains therequiresdirective.
-
Constructor Details
-
ModuleSystemNotes
public ModuleSystemNotes()
-
-
Method Details
-
minimalModuleDeclaration
Shows the shape of a minimal module declaration.- Returns:
- a compact
module-info.javaexample
-
requiresDirective
Explains therequiresdirective.- Returns:
- a short explanation of
requires
-
exportsDirective
Explains theexportsdirective.- Returns:
- a short explanation of
exports
-
projectDecision
Explains why this project is not modularized at this stage.- Returns:
- the project decision about modules
-