Class ModuleDescription

    • Method Detail

      • createAlias

        public static ModuleDescription createAlias​(String moduleName,
                                                    String targetName)
        Creates a module-alias with the discovered module path.
        Parameters:
        moduleName - the name of the module
        targetName - the target name for the alias
        Returns:
        the module description for the alias
      • createAlias

        public static ModuleDescription createAlias​(Path modulePath,
                                                    String moduleName,
                                                    String targetName)
        Creates a module alias based on the module path. If the module path is null an attempt to discover it will be done.
        Parameters:
        modulePath - the path to the base module path
        moduleName - the name of the module
        targetName - the target name for the alias
        Returns:
        the module description for the alias
      • name

        public String name()
        The modules name.
        Returns:
        the modules name
      • modulePath

        public Path modulePath()
        The path to the module.
        Returns:
        the path to the module
      • close

        public void close()
        Deletes the module files and directories. If an error occurs attempting to delete the module, a shutdown hook is added to attempt to delete the resources when the JVM exits.
        Specified by:
        close in interface AutoCloseable
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object