public static final class Layer.Controller extends Object
Layer
to create
module layers return a Controller
that can be used to control
modules in the layer.
Unless otherwise specified, passing a null
argument to a
method in this class causes a NullPointerException
to be thrown.
Controller
objects, they
should never be shared with untrusted code.Modifier and Type | Method | Description |
---|---|---|
Layer.Controller |
addOpens(Module source,
String pn,
Module target) |
Updates module
source in the layer to open a package to
module target . |
Layer.Controller |
addReads(Module source,
Module target) |
Updates module
source in the layer to read module
target . |
Layer |
layer() |
Returns the layer that this object controls.
|
public Layer layer()
public Layer.Controller addReads(Module source, Module target)
source
in the layer to read module
target
. This method is a no-op if source
already
reads target
.target
from being GC'ed when source
is strongly reachable.source
- The source moduletarget
- The target module to readIllegalArgumentException
- If source
is not in the layerModule.addReads(java.lang.reflect.Module)
public Layer.Controller addOpens(Module source, String pn, Module target)
source
in the layer to open a package to
module target
. This method is a no-op if source
already opens the package to at least target
.source
- The source modulepn
- The package nametarget
- The target module to readIllegalArgumentException
- If source
is not in the layer or the package is not
in the source moduleModule.addOpens(java.lang.String, java.lang.reflect.Module)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-internal+0-adhoc.mlchung.jdk9-jdeps