Class InterpretedHelper

java.lang.Object
org.jboss.byteman.rule.helper.Helper
org.jboss.byteman.rule.helper.InterpretedHelper
All Implemented Interfaces:
HelperAdapter

public class InterpretedHelper extends Helper implements HelperAdapter
Implementation of RuleHelper which extends the functionality of the standard helper class, Helper, by adding the methods required to implement interface RuleHelper. It provides an implementation which executes rules by interpreting the rule tree. Any rule which employs the standard helper type checks built in method calls against class Helper. However, the interpreter assumes that the helper object implements InterpretedHelper. When a rule is compiled class Helper is extended with a generated class CompiledHelper<NNN> which also implements interface RuleHelper. The implementation of the execute method is generated by translating the parse tree to bytecode. Builtin calls are translated to calls of methods defined by class Helper. A rule can also specify its own helper class in order to provide its own set of builtin operations. The helper class does not implement interface RuleHelper. Instead the compilation process will generate a subclass of the user-defined helper class which provides an appropriate implementation for the RuleHelper methods, including an implementation of the execute method dreived from the rule parse tree. As in the default case, builtin calls are translated to calls of methods defined by the helper class.