Package sleep.bridges
Class DefaultEnvironment
- java.lang.Object
-
- sleep.bridges.DefaultEnvironment
-
- All Implemented Interfaces:
Environment,Loadable
public class DefaultEnvironment extends java.lang.Object implements Loadable, Environment
-
-
Constructor Summary
Constructors Constructor Description DefaultEnvironment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbindFunction(ScriptInstance si, java.lang.String type, java.lang.String name, Block code)binds a function (functionName) of a certain type (typeKeyword) to the defined functionBody.voidscriptLoaded(ScriptInstance si)called when a script is loadedvoidscriptUnloaded(ScriptInstance si)called when a script is unloaded
-
-
-
Method Detail
-
scriptUnloaded
public void scriptUnloaded(ScriptInstance si)
Description copied from interface:Loadablecalled when a script is unloaded- Specified by:
scriptUnloadedin interfaceLoadable
-
scriptLoaded
public void scriptLoaded(ScriptInstance si)
Description copied from interface:Loadablecalled when a script is loaded- Specified by:
scriptLoadedin interfaceLoadable
-
bindFunction
public void bindFunction(ScriptInstance si, java.lang.String type, java.lang.String name, Block code)
Description copied from interface:Environmentbinds a function (functionName) of a certain type (typeKeyword) to the defined functionBody.- Specified by:
bindFunctionin interfaceEnvironmenttype- the keyword for the function. (i.e. sub)name- the function name (i.e. add)code- the compiled body of the function (i.e. code to add 2 numbers)
-
-