Interface Script
-
- All Superinterfaces:
AutoCloseable
public interface Script extends AutoCloseable
Represents an individual script
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddepend(String path)Marks that this script depends on another script.voiddepend(Path path)Marks that this script depends on another script.CompositeAutoClosablegetClosables()Gets the scripts composite closable registry.Set<Path>getDependencies()Gets the other scripts depended on by this script.ScriptLoggergetLogger()Gets the scripts logger instanceStringgetName()PathgetPath()Gets the path of the script.-
Methods inherited from interface java.lang.AutoCloseable
close
-
-
-
-
Method Detail
-
getName
String getName()
- 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
-
-