Interface ScriptLoader
-
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
EnvironmentScriptLoader
- All Known Implementing Classes:
DelegateScriptLoader
public interface ScriptLoader extends AutoCloseable
An object capable of loadings scripts and monitoring them for updates.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidclose()ScriptEnvironmentgetEnvironment()Gets the script environment this loader is operating indefault voidunwatch(String... paths)Unloads a scriptvoidunwatchAll(Collection<String> paths)Unloads a collection of scriptsdefault voidwatch(String... paths)Loads and watches a scriptvoidwatchAll(Collection<String> paths)Loads and watches a collection of scripts
-
-
-
Method Detail
-
getEnvironment
ScriptEnvironment getEnvironment()
Gets the script environment this loader is operating in- Returns:
- the parent environment
-
watch
default void watch(String... paths)
Loads and watches a script- Parameters:
paths- the path to watch
-
watchAll
void watchAll(Collection<String> paths)
Loads and watches a collection of scripts- Parameters:
paths- the paths to watch
-
unwatch
default void unwatch(String... paths)
Unloads a script- Parameters:
paths- the path to unwatch
-
unwatchAll
void unwatchAll(Collection<String> paths)
Unloads a collection of scripts- Parameters:
paths- the paths to unwatch
-
close
void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
-