Class DelegateScriptLoader
- java.lang.Object
-
- me.lucko.scriptcontroller.environment.loader.DelegateScriptLoader
-
- All Implemented Interfaces:
AutoCloseable,ScriptLoader
public class DelegateScriptLoader extends Object implements ScriptLoader
AScriptLoaderwhich delegates calls to a parent, but keeps track of the files watched via its instance.
-
-
Constructor Summary
Constructors Constructor Description DelegateScriptLoader(ScriptLoader parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()ScriptEnvironmentgetEnvironment()Gets the script environment this loader is operating invoidunwatchAll(Collection<String> paths)Unloads a collection of scriptsvoidwatchAll(Collection<String> paths)Loads and watches a collection of scripts-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface me.lucko.scriptcontroller.environment.loader.ScriptLoader
unwatch, watch
-
-
-
-
Constructor Detail
-
DelegateScriptLoader
public DelegateScriptLoader(ScriptLoader parent)
-
-
Method Detail
-
getEnvironment
public ScriptEnvironment getEnvironment()
Description copied from interface:ScriptLoaderGets the script environment this loader is operating in- Specified by:
getEnvironmentin interfaceScriptLoader- Returns:
- the parent environment
-
watchAll
public void watchAll(Collection<String> paths)
Description copied from interface:ScriptLoaderLoads and watches a collection of scripts- Specified by:
watchAllin interfaceScriptLoader- Parameters:
paths- the paths to watch
-
unwatchAll
public void unwatchAll(Collection<String> paths)
Description copied from interface:ScriptLoaderUnloads a collection of scripts- Specified by:
unwatchAllin interfaceScriptLoader- Parameters:
paths- the paths to unwatch
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceScriptLoader
-
-