Package com.scriptbasic.hooks
Class NullHook
java.lang.Object
com.scriptbasic.hooks.NullHook
- All Implemented Interfaces:
InterpreterHook
public class NullHook extends java.lang.Object implements InterpreterHook
The simplest implementation of the InterfaceHook interface. This implements
each of the methods of the interface, each doing nothing.
This hook is used to chain into the hook chain first so that hook classes need not check if there is a next hook object in the chain.
- Author:
- Peter Verhas date Aug 15, 2012
-
Constructor Summary
Constructors Constructor Description NullHook() -
Method Summary
Modifier and Type Method Description voidsetInterpreter(Interpreter interpreter)During registration the interpreter calls this method to make the interpreter accessible for the hook objects.voidsetNext(InterpreterHook next)When a hook is registered the registering process calls this method and passes the next element in the hook chain.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.scriptbasic.spi.InterpreterHook
afterCallJavaFunction, afterExecute, afterExecute, afterPop, afterPush, beforeCallJavaFunction, beforeExecute, beforeExecute, beforePop, beforePush, beforeRegisteringJavaMethod, beforeSubroutineCall, init, setReturnValue, variableRead
-
Constructor Details
-
NullHook
public NullHook()
-
-
Method Details
-
setNext
Description copied from interface:InterpreterHookWhen a hook is registered the registering process calls this method and passes the next element in the hook chain. The hook object should remember this object and call the appropriate methods when that is called not to break the chain.- Specified by:
setNextin interfaceInterpreterHook- Parameters:
next- the next element in the chain.
-
setInterpreter
Description copied from interface:InterpreterHookDuring registration the interpreter calls this method to make the interpreter accessible for the hook objects.- Specified by:
setInterpreterin interfaceInterpreterHook- Parameters:
interpreter- parameter
-