Class ScriptEvaluator

  • All Implemented Interfaces:
    ICookable, IMultiCookable, IScriptEvaluator

    public class ScriptEvaluator
    extends MultiCookable
    implements IScriptEvaluator
    An implementation of IScriptEvaluator that utilizes the JANINO Java compiler.

    This implementation implements the concept of "Local methods", i.e. statements may be freely intermixed with method declarations. These methods are typically called by the "main code" of the script evaluator. One limitation exists: When cooking multiple scripts in one ScriptEvaluator, then local method signatures (names and parameter types) must not collide between scripts.

    A plethora of "convenience constructors" exist that execute the setup steps instantly. Their use is discouraged, in favor of using the default constructor, plus calling a number of setters, and then one of the cook() methods.