Class AbstractScriptingHandler

    • Constructor Detail

      • AbstractScriptingHandler

        public AbstractScriptingHandler()
    • Method Detail

      • isPresent

        public abstract boolean isPresent()
        Returns whether the handler can be used.
        true if available
      • loadScriptObject

        public abstract Object[] loadScriptObject​(Class cls,
                                                  PlaceholderFile scriptFile,
                                                  String scriptOptions,
                                                  Variables vars)
        Loads the scripts object and sets its options.
        cls - the class to instantiate
        scriptFile - the external file to load
        scriptOptions - the options to set
        vars - the variables to use for expanding
        element 0: error messsage (null if ok), element 1: script object
      • invoke

        public abstract Object invoke​(Object o,
                                      String methodName,
                                      Class[] paramClasses,
                                      Object[] paramValues)
        Executes the specified method on the current interpreter and returns the result, if any.
        o - the object the method should be called from, e.g., an Interpreter
        methodName - the name of the method
        paramClasses - the classes of the parameters
        paramValues - the values of the parameters
        the return value of the method, if any (in that case null)