Class CompositeScriptHelper

java.lang.Object
com.axelor.script.AbstractScriptHelper
com.axelor.script.CompositeScriptHelper
All Implemented Interfaces:
ScriptHelper

public class CompositeScriptHelper extends AbstractScriptHelper
  • Constructor Details

    • CompositeScriptHelper

      public CompositeScriptHelper(Bindings bindings)
    • CompositeScriptHelper

      public CompositeScriptHelper(Context context)
  • Method Details

    • 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
    • doCall

      protected Object doCall(Object obj, String methodCall)
      Overrides:
      doCall in class AbstractScriptHelper
    • 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