Interface ResolvedModuleKey


  • public interface ResolvedModuleKey
    SPI for identifying a resolved module and loading its source code.
    • Method Detail

      • getUri

        java.net.URI getUri()
        Returns the URI of the resolved module. This URI identifies the location that the module's source code will be loaded from. If ModuleKey.isCached() is true, this URI will also be used as a cache key for the module.
      • loadSource

        java.lang.String loadSource()
                             throws java.io.IOException
        Loads module(s) from getUri(). All necessary SecurityManager checks have already been performed before invoking this method.

        In some cases, a module's source code is already loaded as part of resolving the module, typically for performance reasons. In such a case, this method will not need to perform any additional I/O.

        Throws:
        java.io.IOException - if an I/O error occurs while loading the source code