Class CScriptUtils

java.lang.Object
com.priint.pubserver.comet.bridge.cscript.CScriptUtils

public class CScriptUtils extends Object
  • Method Details

    • isCScript

      public static boolean isCScript(String script)

      Checks, whether a script is a cscript

      Parameters:
      script - the script to check
      Returns:
      true, if the script appears to be a cscript, false otherwise
    • isPythonScript

      public static boolean isPythonScript(String script)

      Checks, whether a script is a Python script

      Parameters:
      script - the script to check
      Returns:
      true, if the script is a python script, false otherwise
    • getScriptIncludes

      public static Set<String> getScriptIncludes(String script)

      Gets includes (cscript) or imports (python) of a script

      Parameters:
      script - the script to scan for includes or imports
      Returns:
      set of includes in this script
    • getShortcutForPluginInclude

      public static String getShortcutForPluginInclude(String pluginInclude, Map<String,String> qname2shortcutMappings)
    • rewriteIncludes

      public static String rewriteIncludes(String script, Set<String> foundIncludes, String localPrefix, Map<String,String> qname2ShortcutMappings)
    • rewriteIncludes

      public static String rewriteIncludes(String script, String localPrefix, Map<String,String> qname2ShortcutMappings)