Class HookRegisterUtility

java.lang.Object
com.scriptbasic.utility.HookRegisterUtility

public class HookRegisterUtility extends Object
Author:
Peter Verhas date Aug 4, 2012
  • Method Details

    • registerHooks

      public static void registerHooks(Interpreter interpreter)
      Create hook instances and chain them up based on the configuration file. The configuration contains hook.0, hook.1 ... properties keys and their value is the name of the class that implements the InterpreterHook interface.

      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 the init() invocation already uses the normal chaining.

      Parameters:
      interpreter - the interpter in which the hooks are registered