Interface Script

    • Method Detail

      • getName

        String getName()
        Gets the name of the script, usually formed from the scripts path file name.
        Returns:
        the name of the script
      • getPath

        Path getPath()
        Gets the path of the script.

        The path is relative to the loader directory.

        Returns:
        the path
      • getLogger

        ScriptLogger getLogger()
        Gets the scripts logger instance
        Returns:
        the logger
      • getClosables

        CompositeAutoClosable getClosables()
        Gets the scripts composite closable registry.
        Returns:
        the scripts closable registry
      • getDependencies

        Set<Path> getDependencies()
        Gets the other scripts depended on by this script.
        Returns:
        this scripts dependencies
      • depend

        void depend​(String path)
        Marks that this script depends on another script.
        Parameters:
        path - the other script
      • depend

        void depend​(Path path)
        Marks that this script depends on another script.
        Parameters:
        path - the other script