Package hec.script

Class ScriptEngine

java.lang.Object
hec.script.ScriptEngine

public class ScriptEngine extends Object
singleton class for the ScriptEngine
  • Field Details

  • Method Details

    • getCacheDirectory

      public static String getCacheDirectory()
    • init

      public static String init(String[] argv)
    • engine

      public static ScriptEngine engine()
    • setForwardExceptions

      public void setForwardExceptions(boolean b)
    • compile

      public String compile(String script, Component parent)
      compile the script
      Parameters:
      script -
      parent -
      Returns:
    • compile

      public String compile(Script script, String fileName, int headerLines, Component parent)
      compile the script.
      Parameters:
      script - the script to compile
      fileName - the file name of the script
      headerLines - the number of header lines the system put in the script
      parent - the parent component to display the JOptionPane with
      Returns:
      null if no errors otherwise the error string.
    • execute

      public int execute(Script script, String userName, String scriptName)
    • execute

      public int execute(String scriptFile, String userName, String scriptName) throws Exception
      Throws:
      Exception
    • execute

      public int execute(String scriptFile, String userName, String scriptName, Object[][] args) throws Exception
      Throws:
      Exception
    • execute

      public int execute(String scriptText, String userName, String scriptName, Object[][] args, boolean clientApp) throws Exception
      Throws:
      Exception
    • removeScriptHeader

      protected String removeScriptHeader(String scriptText)
    • getNewScript

      public static Script getNewScript()
    • getInterpreter

      public org.python.util.PythonInterpreter getInterpreter()
    • clear

      public static void clear()