Class CompositeScriptHelper

    • Constructor Detail

      • CompositeScriptHelper

        public CompositeScriptHelper​(Bindings bindings)
      • CompositeScriptHelper

        public CompositeScriptHelper​(Context context)
    • Method Detail

      • call

        public Object call​(Object obj,
                           String methodCall)
        Description copied from interface: ScriptHelper
        Call a method on the given object.

        The methodCall is a string expression containing arguments to be passed. For example:

         scriptHelper.call(bean, "test(var1, var2, var3)");
         
        This is a convenient method to call:
         scriptHelper.call(bean, "test", new Object[] { var1, var2, var3 });
         
        Specified by:
        call in interface ScriptHelper
        Overrides:
        call in class AbstractScriptHelper
        Parameters:
        obj - the object on which method should be called
        methodCall - method call expression
        Returns:
        return value of the method
      • eval

        public Object eval​(String expr,
                           Bindings bindings)
                    throws Exception
        Description copied from interface: ScriptHelper
        Evaluate the given expression with the given bindings.
        Parameters:
        expr - the expression to evaluate
        bindings - the context bindings
        Returns:
        expression result
        Throws:
        Exception