Package com.scriptbasic.utility
Class HookRegisterUtility
java.lang.Object
com.scriptbasic.utility.HookRegisterUtility
public class HookRegisterUtility
extends java.lang.Object
- Author:
- Peter Verhas date Aug 4, 2012
-
Method Summary
Modifier and Type Method Description static voidregisterHooks(Interpreter interpreter)Create hook instances and chain them up based on the configuration file.
-
Method Details
-
registerHooks
Create hook instances and chain them up based on the configuration file. The configuration containshook.0,hook.1... properties keys and their value is the name of the class that implements theInterpreterHookinterface.The method loads the classes, creates a new instance of each configured class and registers the new object in the interpreter.
Note that registering does not include the call to the method
InterpreterHook.init(). It is executed when all the hook objects are chained and theinit()invocation already uses the normal chaining.- Parameters:
interpreter- the interpter in which the hooks are registered
-