Package Summary  Overview Summary

class:ModuleLayer.Controller [NONE]

  • Enclosing class:

    public static final class ModuleLayer.Controller
    extends Object
    Controls a module layer. The static methods defined by ModuleLayer 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.

    API Note:
    Care should be taken with Controller objects, they should never be shared with untrusted code.

method:layer() [NONE]

  • layer

    public ModuleLayer layer()
    Returns the layer that this object controls.
    the module layer

method:addReads(java.lang.Module,java.lang.Module) [NONE]

  • addReads

    public ModuleLayer.Controller addReads​(Module source,
                                           Module target)
    Updates module source in the layer to read module target. This method is a no-op if source already reads target.
    Implementation Note:
    Read edges added by this method are weak and do not prevent target from being GC'ed when source is strongly reachable.
    source - The source module
    target - The target module to read
    This controller
    IllegalArgumentException - If source is not in the module layer
    See Also:

method:addExports(java.lang.Module,java.lang.String,java.lang.Module) [NONE]

method:addOpens(java.lang.Module,java.lang.String,java.lang.Module) [NONE]

© 2018 Oracle Corporation and/or its affiliates