(JPA) Java Persistence API 48
(JShell) Java Shell Tool 20
@Controller annotation 370
@-files (argument files) 198
@Generated annotation 160, 160, 162
@jdk.Exported annotation 145
@Nonnull annotation 156, 157, 160, 162
@Nullable annotation 157
@RequestMapping annotation 370
$JAVA_HOME 196
abstract classes 228
Abstract Window Toolkit (AWT) 19
defined 67
encapsulating transitive dependencies 71–71
encapsulation skirmishes 72–75
AccessibleObject::setAccessible 193, 280
AccessibleObject::trySetAccessible 280
addExports 286
Add-Exports 198
--add-exports option 133, 150, 152, 153, 154, 163, 199, 268, 269, 298
--add-modules ALL-MODULE-PATH 174
add-modules monitor.persistence 116
--add-modules option 81, 82, 106, 106, 106, 115, 122, 129, 129, 160, 162, 173, 174, 181, 182, 183, 198, 203, 243, 259, 259, 268, 316, 316, 318, 318
--add-modules option, defined 81
addOpens 286
Add-Opens 198
--add-opens option 133, 154, 199, 298, 298
--add-opens option, defined 277
addPropertyChangeListener method 147
addReads 286
--add-reads app=ALL-UNNAMED option 186
--add-reads option 163
--add-reads option, defined 82
addUses 286
AdoptOpenJDK 192
aggregation 253
aggregator modules 20, 252, 252, 253
ALL-DEFAULT value 81
ALL-SYSTEM value 81
ALL-UNNAMED value 149, 149, 186
AlphaServiceObserver 36, 37, 37, 221, 222, 228
ambiguity checks 63
anchor class 109
AnnotatedElement interface 370
annotation processors, defined 77
Apache Derby DB 139
Apache Hadoop 17
--api-only option 382
APIs
decoupling implementations and consumers of 48–48
internal, encapsulation of
analyzing dependencies with JDeps 147–148
compiler and JVM options for accessing internal APIs 155–155
compiling against internal APIs 149–150
executing against internal APIs 150–154
sun.misc.Unsafe class and 146–146
Applet API 140
appletviewer tool 140
application class loader 126, 290
application images, defined 322
application modules, defined 58
argument files (@-files) 198
AssertJ 200
asterisk, as token for module name 94–95
Automatic-Module-Name 176, 178, 179–180, 188, 189, 190, 204, 205, 206, 209, 213
automatic modules
as bridge to classpath 187–187
defined 59
names, adding and editing 209–210
AWT (Abstract Window Toolkit) 19
base module
defined 58
BCEL (Byte Code Engineering Library) 89
BetaServiceObserver 36, 37, 37, 221, 223, 228
--bind-services option 320, 323
--bind-services option, defined 318
boot class loader 290
-bootclasspath option 98
boot classpath options 137, 137
boot layer, defined 290
bottom-up modularization 200, 202–202, 213
break-duplicate-modules-even-if-unrequired branch 63
break-missing-transitive-dependency 62
break-reflection-over-internals branch 73
break-split-package-compilation branch 66
break-split-package-launch branch 66
BuiltinClassLoader 133, 133, 140
bundles 358
Byte Code Engineering Library (BCEL) 89
caller sensitive methods 286
chains of dependencies 248
--check option 383
cherry-picking functionality, defined 28
Class::getResource* method 135
class-data sharing 336
class diagrams 6
classes
.class files 21, 23, 25, 89, 109, 377, 385
class-for-name plugin 336
ClassLoader::getPlatformClassLoader 290
ClassLoader::getResource* method 135
ClassLoader::getSystemClassLoader method 290
ClassLoader class 107, 108, 122, 131, 133, 140, 154
class loaders 358
ClassNotFoundException 358
defined 365
using to load application JARs 365–366
class-path mode . see unnamed module
class-path mode . see unnamed module
-classpath option 366
-classpath option . seeAlso -cp
--class-path option 171, 366, 379
--class-path option . -classpath option
CMS (Concurrent Mark Sweep) 140
Collection<String> roots argument 294
com.google.collect package 309
com.google.common.collect.Iterators class 13
com.google.common.io.InputSupplier class 15
com.sun.* packages 143, 144, 263
com.sun.java.swing.plaf.nimbus package 150
command-line options 27, 70, 180, 198–198, 199, 199, 201
commenting module declarations 351–351
compatibility issues, when moving to Java 9 (or later) 125–140
JEE modules, working with 127–131
selecting, replacing, and extending platform 135–137
tools no longer included 139–139
updated run-time image directory layout 134–135
URLClassLoader, casting to 131–134
compiledVersion method 308
compiling
errors with 9, 25, 91, 142, 193, 193
asterisk as token for module name 94–95
composition 253
compress plugin
defined 332
concealed package conflict 156
concern/module hierarchy 86
Concurrent Mark Sweep (CMS) 140
configuration method 291
configurations.compile 377
configurations.runtime 377
Consumer actor 227
consumers
isolating from global state 230–232
organizing into modules 232–233
continuous integration (CI) 194
copy-dependencies 377
Copy task 377
coupling, keeping to minimum 348–349
—cp . seeAlso -classpath option
-cp option 366
createIfMatchingService method 223, 229
--create-module option 90
cyclic dependencies, using services to break 233–235
debugging modules and modular applications 111–120
analyzing individual module 111–111
validating sets of modules 112–112
excluding modules during resolution 115–117
listing observable modules and dependencies 113–115
observing module system with log messages 118–120
validating module graph 112–113
debug messages 374
debug option 151
debug symbols 334
declaration 53
deep reflection 369
defineModules 296
defineModulesWithManyLoaders method 296
defineModulesWithOneLoader method 296
deny option 151
dependencies
declaring on other modules 40–41
defined 55
direct 366
implying readability on 247–248
reliable configuration and 257–257
unexpressed between JARs 12–12
dependency inversion 7
dependency tree 304
describe method 291
--describe-module option 111, 306
describe operation 51
DiagnosticDataPoint class 33, 36, 36, 36, 37, 37, 40, 47, 47, 100, 246
direct dependencies 96, 201, 366
directed edges 79
directory structure
new proposal 86
directory structure, organizing projects in 86–89
established directory structure 87–88
place for module declarations 88–89
dirty checking 329
DisconnectedServiceObserver class 72, 72, 73, 73, 74, 75
DOM (document object model) 19, 127, 263
--dot-output option 380
--dry-run option 112, 113, 119, 122
dynamic modules 289
EAR file 99
Eclipse JGit 16
ecosystem-wide dependency graph 204
encapsulation
analyzing dependencies with JDeps 147–148
compiler and JVM options for accessing internal APIs 155–155
compiling against internal APIs 149–150
executing against internal APIs 150–154
sun.misc.Unsafe class and 146–146
of transitive dependencies 71–71
endorsed standards override mechanism 127–137
equals comparison 303
erroneous module declarations 208
exclude-files plugin, defined 333
exclude-resources plugin, defined 333
executable modules 176
ExecutionException 8
explicit modules 185
explicit modules, defined 59
export directives 39, 41, 53, 83, 221, 244, 262, 272, 272–273, 275, 275, 276, 278, 297
exported packages 27
defined 56
exports, making more targeted 48–48
exports clauses 109
exports directives 340, 341, 341, 343, 348, 349, 354
exports to directive 267, 269, 274
exposed module 247, 247, 250, 250, 251
exposing module 247, 247, 250, 250, 251
ExtendedCopyOption class 146
ExtendedOpenOption class 146
ExtendedWatchEventModifier class 146
factories, as services 228–229
fat JAR 13
feature-implied-readability branch 245
feature-jlink branch 315
featureObject.getClass().newInstance() method 358
feature-optional-dependencies branch 256
feature-qualified-exports branch 262
feature-resources branch 107
features-combined branch 340
feature-services branch 217
feature-versions branch 306
file=value 374
FindBugs 157
findFirst() method 239
findLoader method 291
FXML 20
gc (garbage collection) 373
generate-jli-classes plugin 336
--generate-module-info option 382
--generate-open-module option 207, 382
getAnnotations method 370
getCallerClass 293
getClass().getClassLoader() method 131
getClassLoader method 131
getClass method 131
getConstructor method 368, 369
get method 369
getMethod method 368, 368, 369
getName method 172
getResourceAsStream method 107, 109, 122
getResource method 107, 109, 109, 109, 110, 122
global state, isolating consumers from 230–232
gradle dependencies 6
graphs . module graphs
Guava 46, 78, 179, 181, 185, 188, 189, 200, 250, 310
Hazelcast 17
Hibernate 27, 41, 48, 48, 70, 84, 200
hibernate.jpa dependency 24, 43, 116
hibernate.jpa module 323
high-level code 7
HotSpot FlatProfiler 140
hprof agent library 139
--illegal-access=permit option 152
IllegalAccessError 186
IllegalAccessException 369
--illegal-access option 151, 151, 152, 153, 154, 193, 199
IllegalCallerException 286
ImageIO API, Java 229
ImmutableList 185, 185, 185, 186
implied readability 71, 247–248, 253
refactoring modules with 251–255
InaccessibleObjectException 280, 280
include-locales plugin
defined 333
incremental modularization
technical underpinnings of 169–170
incubator modules, defined 58
indirect dependencies 201
inner classes 228
InputSupplier class 15
inside-out modularization 200, 203–204, 213
instanceof 303
IntelliJ 13
internal packages/APIs 133, 144, 145
InterruptedException 8
--inverse option 381
--inverse option . -I option
invoke method 368
-I option 381
-I option . —inverse option
IoT (Internet of Things) 314
isAnnotationPresent 240
iterate method 242
iterator method 239
Iterators class 13
Jackson 244
jar command 29, 30, 49, 85, 134, 306, 313
jar --describe-module 111, 179, 201, 306, 307, 313
jar --main-class 101
jar --module-version 300
-jar option 198
JARs
dependencies unexpressed between 12–12
loading, using class path 365–366
generating module declarations with JDeps 206–208
hacking third-party JARs 209–211
opening modules as intermediate step 205–206
modular, publishing for Java 8 and older 211–212
plain, mixing and matching with modules 168–168
weak encapsulation across 16–17
jar tool 21, 99, 101, 102, 178, 209, 210
jar --update option 210, 211, 211
java.activation module 127, 131
java.applet package 140
java.awt.* package 19
java.awt.dnd.peer package 147
java.awt.peer package 147
java.base module 19, 21, 22, 23, 23, 24, 57, 100, 115, 136, 200, 224, 287, 318, 332, 332, 335
java.beans package 19
java.class.path property 133
java.compiler module 136
java.desktop module 19, 115, 263, 263
java.endorsed.dirs property 137
java.ext.dirs property 136
java.instrument module 136
java.lang.invoke.VarHandle class 282
java.lang.module.ModuleDescriptor class 284
java.lang.Module class 109, 122, 284
java.lang.ModuleLayer class 291
java.lang.Object class 57
java.lang.System.LoggerFinder class 224
java.logging module 19, 57, 57, 136, 248, 248, 251
java.management module 136
java.nio.charset.spi.CharsetProvider class 319
java.prefs module 136
java.runtime.version property 138
java.scripting module 136
java.se.ee module 20
java.security.jgss module 136, 320
java.security.sasl module 136, 320
java.smartcardio 320
java.specification.version property 138
java.sql.Connection class 247
java.sql.Driver 248
java.sql.Driver.getParentLogger() method 251
java.sql.Driver class 224
java.sql.rowset module 20, 136
java.sql.SQLXML class 247
java.sql module 20, 60, 136, 224, 232, 247, 378
java.transaction module 127, 131
java.util.Base64 class 146
java.util.concurrent package 9, 56, 56
java.util.jar.Pack200.Packer class 147
java.util.jar.Pack200.Unpacker class 147
java.util.List class 301
java.util.logging.Logger class 248
java.util.logging.LogManager class 147
java.util.logging package 19, 57
java.version property 138
java.vm.specification.version property 138
java.vm.version property 138
java.xml.bind module 20, 127, 127, 129, 131, 157, 196
java.xml.crypto module 136, 263, 265, 266, 320
java.xml.ws.annotation module 127, 131, 157, 160, 163
java.xml.ws module 127, 131, 265
java.xml module 19, 21, 23, 23, 24, 60, 115, 136, 265
java @file option 277
Java 5, no compilation for 137–137
Java 9 or before
loading resources from modules before Java 9 107–107
loading resources from modules on Java 9 108–109
Java 9 or later
encapsulation of internal APIs 143–155
mending split packages 156–164
compatibility issues when moving to 125–140
JEE modules, working with 127–131
selecting, replacing, and extending platform 135–137
tools no longer included 139–139
updated run-time image directory layout 134–135
URLClassLoader, casting to 131–134
Java API for XML Processing (JAXP) 19, 263
Java API for XML Web Services (JAX-WS) 127
Java Architecture for XML Binding (JAXB) 20, 127
JavaBeans 19
JavaBeans Activation Framework (JAF) 127
javac file option 277
java command 29, 30, 44, 49, 58, 76, 77, 81, 103, 104, 121, 137, 149, 153, 198, 277, 316, 327, 366, 372
Java Community Process (JCP) 127, 157
javac tool 29, 30, 43, 49, 58, 76, 77, 81, 85, 91, 98, 102, 134, 136, 137, 149, 198, 277, 306, 313, 316, 317, 366
Java Database Connectivity (JDBC) 20, 263
JavaDB 139
Java Dependency Analysis Tool (JDeps) 20
java --describe-module option 111, 265, 307
Java Development Kit (JDK) 4, 358–358
javadoc tool 134
Java Flight Recorder 139
javafx.bindings module 20
javafx.controls module 20
javafx.graphics module 263
javafx.media module 20
javafx.scene.web module 333
javafx.swing 20
javafx.web 20
java --list-modules option 20, 51, 58, 113
java --module option 326
Java modules (JMODs) 51–
Java Network Launch Protocol (JNLP) 138
javapackager 315
Java Persistence API (JPA) 48, 329
Java Platform Group 305
Java Remote Method Invocation Compiler 196
java-rmi.cgi 139
java-rmi.exe 139
Java Runtime Environment (JRE) 127, 137–137, 144
Java SE API 20
Java Shell Tool (JShell) 20
java --show-module-resolution option 173
Java Specification Request (JSR) 28, 157
java tool 315
Java Util Logging 371
Java Virtual Machine (JVM) 8, 328
Java Web Start 137
javaws tool 140
javax.* packages 143
javax.annotation.Generated annotation 163
javax.annotation.Nonnull annotation 163
javax.annotation package 127, 157, 157, 160, 160, 160, 162
javax.swing.* packages 19
javax.xml.bind.JAXB class 157
javax.xml.bind.JAXBException 157
javax.xml.bind.Marshaller class 157
javax.xml.bind package 157
javax.xml.datatype package 266
javax.xml.XMLConstants class 23
JAXB (Java Architecture for XML Binding) 20, 127
JAXP (Java API for XML Processing) 19, 263
JAX-WS (Java API for XML Web Services) 127
JBoss Modules 167
jcmd tool 139
JCP (Java Community Process) 127, 157
JDBC (Java Database Connector) 20, 263
JDBC RowSet API 20
JDeps (Java Dependency Analysis Tool)
analysing dependencies 379–379–381, 382
analyzing dependencies 147–148
generating module declarations with 206–208
right-sizing images with 320–322
jdeps --generate-module-info option 213
jdeps -h option 382
JDK_JAVA_OPTIONS variable 198
jdk.* modules 145
jdk.* packages 144
jdk.charsets module 225, 318, 320
jdk.compiler module 317
jdk.crypto.cryptoki module 320
jdk.crypto.ec module 320
jdk.deploy module 320
jdk.Exported annotation 144
jdk.incubator.* modules 58
jdk.internal.loader package 133
jdk.localedata module 319, 319, 320, 325, 333, 333
jdk.security.jgss module 320
jdk.unsupported module 146, 147, 174
jdk.zipfs module 320
JDK (Java Development Kit) 358–358
JDK-internal APIs 151, 186, 193
--jdk-internals option 147, 382
jdk-monitor 325
JEE modules 82, 127–129, 131, 186, 193
third-party implementations of 130–131
jhat heap visualizer 139
jlink 28, 29, 58, 131, 136, 164, 173, 314, 315, 317, 328, 336
defined 316
optimizing images using jlink plugins 329–336
improving run-time performance 335–336
right-sizing images with 320–322
JLINK_VM_OPTIONS 327
jlink --add-modules option 321
jlink --list-plugins option 331
jmap tool 139
jmod tool 51
JNLP (Java Network Launch Protocol) 138
JOOQ 200
JPA (Java Persistence API) 329
JPEGImageReaderSpi class 229
JPMS (Java Platform Module System)
JRE (Java Runtime Environment) 127, 137–137, 144
JSR (Java Specification Request) 28, 157
jvm.config 196
JVM (Java Virtual Machine) 8, 328
launching with modules 104–107
configuring entire logging pipeline 375–375
defining what messages should say 374–374
defining where messages should go 374–374
defining which messages should be shown 373–374
--launcher option 326
layer() method 296
layers, module graphs with 288–297
creating module layers 294
describing module layer 291
finding modules in and across layers 292–293
lib/modules file 334
--limit-modules option 82, 114, 117, 122, 136, 243
--list-deps option 383
--list-modules option 113, 115, 116
--list-reduced-deps option 383
loadInstalled method 238
load methods 238
locales 320
Locator actor 227
Logback 371
LoggerFinder class 224, 224, 225, 229, 232
Logger getParentLogger() method 248
Lookup class 282, 283, 283, 298
low-level code 7
Main.java file 91
Main-Class entry 101
--main-class option 101
main method 21, 44, 58, 59, 60, 83, 101, 101, 102, 104, 106, 173, 286, 310, 311, 320
manually implement security checks 17
master branch 85
Maven 5, 12, 26, 197, 304, 355–357
encapsulation, services, and linking 356–357
maven-dependency-plugin 377
MethodHandles.lookup() method 282
method signatures 69
microservices
connectivity graphs 5
continuously building on Java 9+ 194–197
estimating effort involved 192–194
Mockito 27
modular code, extending base 45–45
modular diamond of death 67–67
modularization strategies 200–205
applying within project 204–205
bottom-up modularization 202–202
inside-out modularization 203–204
top-down modularization 202–203
modularized dependencies 187
modular JARs 20, 90, 169, 190, 202
defined 52
Module::getResourceAsStream method 135
Module:addOpens method 287
module/concern hierarchy 87
module.getDescriptor().requires() method 308
module.info.java file 74
Module class 299
module class, defined 284
module declarations 21–39, 52, 53, 83, 208, 210
adding and removing services 354–354
changing module's name 353–353
exporting fewer packages 354–354
exporting packages to define module's API 56–56
requiring modules to express dependencies 55–55
ModuleDescriptor::rawVersion method 313
ModuleDescriptor::requires method 313
ModuleDescriptor class 299, 300, 307, 307
ModuleDescriptor class, defined 284
module descriptors 20, 52, 53, 83
defined 52
module erasure 9
ModuleFinder after argument 294
ModuleFinder before argument 294
module graphs 78–83, 182, 288, 289, 297, 299, 344
defined 79
with layers
creating module layers 294
describing module layer 291
finding modules in and across layers 292–293
module-info.class file 39, 44, 52, 52, 89, 90, 99, 99, 99, 102, 211, 212
module-info.java file 21, 21, 38, 39, 49, 52, 53, 70, 88, 89, 89, 90, 91, 206, 206, 352, 355
ModuleLayer
defined 291
module layer, defined 289
automatic 178
unnamed module 176
module not found error 88
--module option 22, 23, 23, 96, 96, 102, 104, 104, 105, 107, 116, 116, 122, 327, 382
--module option . -m option
module path 25, 25, 43, 75, 76, 78
defined 76
--module-path option 22, 43, 49, 76, 77, 84, 89, 316, 382
--module-path option . -p option
module-related commands 76
module resolution 22–23, 61, 77–78, 225–227
module resolution*
for optional dependencies 259
declaring and describing 39–42
declaring dependencies on other modules 40–41
defining module’s public API 41–41
coupling, keeping to minimum 348–349
analyzing module properties with reflection 284–286
forwarding open packages 287–288
modifying module properties with reflection 286–287
updating reflecting code for modules 280–281
using variable handles instead of reflection 282–283
--module-source-path option 93, 93, 95, 96, 102
module types, defined 57
--module-version option 99, 306, 307, 313
--module-version option, defined 306
monitor.* modules 181
monitor.alpha module 43
monitor.core module 254
Monitor.java file 91
monitor.Main class 104
monitor.observer.alpha module 37, 47, 47, 47, 48, 61, 221, 222, 225, 246, 248, 250, 255, 265, 323
monitor.observer.beta module 37, 47, 48, 62, 221, 222, 225, 255, 264, 265, 323
monitor.observer.dis 74
monitor.observer.jar 99, 100, 100, 177
monitor.observer.ServiceObserver class 301
monitor.observer.utils package 265, 343
monitor.observer.zero 236, 237, 237, 325
monitor.observer module 37, 43, 48, 55, 61, 72, 73, 74, 75, 87, 89, 89, 96, 99, 112, 115, 223, 246, 250, 252, 265, 323, 383
monitor.observer package 100, 344
monitor.peek 383
monitor.persistence.entity package 41, 277, 279, 287, 340
monitor.persistence module 37, 41, 62, 63, 64, 251, 279, 323
monitor.resources.opened package 109, 110
monitor.resources module 110, 110
monitor.rest module 37, 41, 44, 64, 96, 96, 181, 183, 323, 343
monitor.statistics.fancy module 81, 81, 82
monitor.statistics.jar 177
monitor.statistics module 37, 46, 49, 53, 54, 55, 56, 62, 63, 64, 66, 96, 115, 252, 254, 260, 323, 342
monitor.statistics package 66, 66, 158, 159
monitor.Utils class 159
Monitor class 33, 33, 35, 35, 36, 36, 37, 37, 41, 221
monitor module 323
monitor package 44, 48, 48, 66, 66, 75, 158, 159, 174, 224, 226
MonitorServer class 36, 36, 36, 37, 37, 41, 156
mon-modular classes 170
monolithic approach 33
-m option . —module option
MR-JARs (multirelease JARs)
creating 212
MR-JARs (multi-release JARs)
defined 385
Multimap 303
multiple modules, compiling 92–93, 97
asterisk as token for module name 94–95
multi-release JARs . See MR-JARs (multi-release JARs)
mvn clean install 195
mvn clean verify 195
mvn dependency:tree 6
my.xml.app.jar 22
my.xml.app module 21, 22, 22, 23, 23, 23
name() method 308
Named modules, defined 59
native2ascii tool 139
Neo4J 17
Netty 17
newInstance() method 358
next method 240
NimbusLookAndFeel class 143, 150, 152, 153
NoClassDefFoundError 12, 15, 78, 127, 127, 159, 160, 258, 260, 261, 262, 322, 387
non-JDK modules 58
non-JEE modules 190
non-modular code 91
non-public classes 144
NotImplementedException 197
observable modules, defined 58
openConnection method 369
opening packages
vs. exporting packages 277–278
defined 278
opens directive 109, 275, 276, 276, 278, 278, 283, 297
defined 275
reliable configuration and 256–257, 257
Oracle JDK 146
order-resources 336
org.eclipse.jgit.internal package 16
OSGi (Open Service Gateway initiative) 357–360
OSGi (Open Service Gateway Initiative) 26
--output option 316
package-name collision 161
--package option 163
package relationships 347
packages
making available to reflection only 48–49
opening
vs. exporting packages 277–278
parent layers 289
parents() method 291
--patch-module option 136, 137, 162, 162, 198, 210, 211, 287
permit option 151
persistence module 40
plain JARs 90, 99, 169, 181, 190, 202
platform class loader 290
defined 58
plugin --${name} command-line option, defined 331
PNGImageReaderSpi class 229
policytool security tool 140
-p option . --module-path option
PowerMock 17
--processor-module-path option 77
--processor-path 77
-profile option 136
Project Jigsaw 4
projects
existing, modularizing 346
lifetime of, effect on benefits of modularization 346
projects, organizing in directory structure 86–89
established directory structure 87–88
new proposal 86
place for module declarations 88–89
protected methods 69
protocol field 369
provider constructor 220
Provider instance 239
provider method 221
providers, organizing into modules 232–233
provides directives 221, 222, 225, 233, 233
Proxy parameter 368
public API, defined 69
public methods 69
public static void main method 23, 100, 104
publishing modules 189
qualified exports 48, 70, 74, 262–268
exporting packages on command line 267–268
exporting packages to modules 264–266
exposing internal APIs 263–263
vs. plain 348
qualified opens 48
qualifying opens, defined 276
rawCompiledVersion() method 308
rawVersion() method 307
readability 60
achieving reliable configuration 61–61
experimenting with unreliable configurations 61–67
readability edges
defined 60
-recursive 379
refactoring modules
with implied readability 251–255
reflected module 282
exports directives as bad fit for 272–275
opening packages
vs. exporting packages 277–278
analyzing module properties with reflection 284–286
forwarding open packages 287–288
modifying module properties with reflection 286–287
updating reflecting code for modules 280–281
using variable handles instead of reflection 282–283
reflection API 367, 368–369, 370
Reflection class 146
ReflectionFactory class 146
--release option 98, 98, 137, 211, 388
reliable configuration 46–46, 83
reload() method 240
Remote Method Invocation (RMI) 19, 263
Remote Method Invocation Compiler (rmic) 196
removePropertyChangeListener method 147
renaming modules 67
requires directive 39, 40, 49, 53, 55, 70, 71, 74, 83, 92, 176, 181, 203, 207, 207, 217, 219, 221, 244, 245, 246, 248, 256, 308, 308, 314
requires directives 340, 341, 341, 349, 354
requires keyword 53
requires optional directive 342
requires static directive 258, 259, 268, 317
requires static directives 342, 354
requires transitive directive 247, 249, 252, 252, 268, 342, 343, 352, 354
ResourceBundleProvider 111
resources, loading from modules 107–111
package resources across module boundaries 109–110
REST endpoint 41
restricted keywords 53
reverse-domain naming scheme 54
RichFaces 15
right-sizing images, with jlink 320–322
rigid runtime 18
RMI (Remote Method Invocation) 19–263
rmic (Remote Method Invocation Compiler) 196
root modules 81
Root modules, defined 58
rt.jar 134
run-time access, opening packages to 275–276
RuntimeException 280
creating self-contained application images 322–327–
image content and structure 317–317
including services in runtime images 318–320
right-sizing images with jlink and jdeps 320–322
generating images across operating systems 328–329
using jlink plugins to optimize images 329–336
improving run-time performance 335–336
run-time representation 11
run-time warnings 25
SAX (Simple API for XML) 19, 127
Scaffold Hunter 148
security checks 17
SecurityManager::checkPackageAccess 17
SensitivityWatchEventModifier class 146
Service actor 227
ServiceConfigurationError 240, 242
ServiceLoader class 170, 176, 217, 221, 225, 227, 229, 230, 234, 235, 240, 240, 241, 242
ServiceMonitor application 9, 24, 24, 33, 33, 38, 46, 49, 61, 72, 79, 91, 92, 104, 119, 158, 171, 208, 221, 226, 254, 288, 294, 295, 325
decoupled with services 344–344
diversified dependencies 342–343
handles dependencies on plain JARs 345–345
loads code at run time with layers 344–345
bells-and-whistles version 340
visualizing with module graph 41–42
ServiceObserver class 33, 33, 36, 37, 37, 47, 48, 75, 100, 222, 228, 228, 229, 240, 246, 251, 288, 296, 325, 344
ServiceObserverFactory 223, 223, 229, 229, 236, 236, 344
ServiceObserver interface 33, 34, 47, 72
ServiceRegistry 229
services
accessing services with ServiceLoader API 237–240
loading and accessing services 238–240
declaring services across different Java versions 235–237
isolating consumers from global state 230–232
organizing services, consumers, and providers into modules 232–233
types that can be services 228–228
using factories as services 228–229
using services to break cyclic dependencies 233–235
in Java Platform Module System (JPMS) 220–227
module resolution for services 225–227
using, providing, and consuming services 220–225
overusing 349
setAccessible method 73, 274, 369, 369
set method 369
shadowing
defined 13
--show-module-resolution option 118, 122, 174, 225
Signal class 146
SignalHandler class 146
Simple API for XML (SAX) 19, 127
SimpleStatistician class 66, 66, 158
single module, compiling 89–92
slow startup 18
Spark micro framework 24, 41, 181
split packages 61, 66, 66, 127, 132, 142, 156, 164
patching modules, as way of handling 162–163
unit tests and 157
Spring 18, 27, 61, 70, 71, 84, 200, 244
src.zip 134
standalone JARs 13
standalone technologies 127
standardized classes 144
starter, to spin up additional layers 309–310
Statistician::compute 40
Statistician class 33, 33, 36, 37, 37, 66
Statistics class 33, 33, 35, 36, 37, 37
StatisticsEntity class 275
statistics module 40, 254, 261
StatisticsRepository class 33, 36, 37, 37, 41
StAX (Streaming API for XML) 19, 263
stderr value 374
stdout value 374
Streaming API for XML (StAX) 19, 263
--strip-debug option 331
strip-debug plugin
defined 334
strong encapsulation 27, 27, 46, 47, 47, 84, 109, 143, 199, 361
suggested descriptor 383
--suggest-providers option 319
--suggest-providers option, defined 318
-summary option 380
sun.* packages 20, 25, 142, 143, 144
sun.misc.BASE64Decoder 147
sun.misc.BASE64Encoder 147
sun.misc.Cleaner 147
sun.misc.Service class 147
sun.misc.Unsafe class 17, 146, 146, 146, 146
Swing 263
system checks 61
system class loader 126, 131, 290
system-modules plugin
--system option 137
temporary fixes 197
Thread::stop 139
TimeoutException 8
TimeUnit class 8
toExternalForm method 368
tools.jar 134
top-down modularization 200, 200, 202–203, 213
transitive dependencies 15, 84, 96, 182–186
transitive reduced graph 383
type method 239
type token 238
uber.lib 250, 257, 257, 257, 258, 261
uber JAR 13
UML diagrams 5
unified logging
configuring entire logging pipeline 375–375
defining what messages should say 374–374
defining where messages should go 374–374
defining which messages should be shown 373–374
use to debug modules 119
unit tests 157
universe of observable modules 76, 84
universe of observable modules, defined 58
unmodularized dependencies 200
unnamed modules 52, 159, 169, 170, 170, 171, 176, 176, 189, 360, 366
defined 59
module resolution for 173–174–181, 186
unreliable configurations 77
UnsupportedOperationException 139, 197
-u option 209
-u option . --update option
--update option . -u option
updateStatistics() method 35
--upgrade-module-path option 130, 136, 161
URL::openConnection method 368
URLClassLoader class 25, 125, 126, 131–131, 131, 134, 134, 140, 193, 193, 213, 233
use directives 220, 221, 225, 227, 234, 237, 242
utils.fancy module 264
Utils class 66
validating sets of modules
excluding modules during resolution 115–117
listing observable modules and dependencies 113–115
validating module graph 112–113
var 26
Vavr 200
-verbose:class 381
-version:N option 141
version() method 307
version conflicts, defined 15
lack of support for in JPMS 301–305
multiple of module, running in separate layers 309–313
accessing module versions 307–309
while building modules 306–307
VisualVM 139
VM (virtual machine) 366
WAR file 99
warn option 151
weak circular dependencies 92, 97
weak encapsulation 198
WebKit 335
Web Start 140
what-expression 375
-Xbootclasspath/p option 137
-Xbootclasspath option 137, 141
-Xboundthreads 139
-Xlog option 119, 371, 372, 374, 375
-Xlog option, defined 371
-Xoptimize 139
-Xoss 139
-Xprof 140
-Xsqnopause 139
-Xusealtsigs 139
-XX:+IgnoreUnrecognizedVMOptions option 196
ZeroServiceObserverFactory class 236, 236
zip file system 320
3.145.173.199