Class HookRegisterUtility


  • public class HookRegisterUtility
    extends java.lang.Object
    Author:
    Peter Verhas date Aug 4, 2012
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void registerHooks​(Interpreter interpreter)
      Create hook instances and chain them up based on the configuration file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • 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