Class SpinScriptEnv


  • public class SpinScriptEnv
    extends java.lang.Object
    Spin provides a set of environment scripts for known scripting languages. These scripts make it easier to use spin in a scripting language. Users can execute these scripts before they execute their custom scripts.
    Author:
    Daniel Meyer
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.Map<java.lang.String,​java.lang.String> extensions
      Mapping of known ScriptEngine language names and file extensions of corresponding script files.
    • Constructor Summary

      Constructors 
      Constructor Description
      SpinScriptEnv()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String get​(java.lang.String language)
      Get the spin scripting environment
      static java.lang.String getExtension​(java.lang.String language)
      Get file extension for script language.
      protected static java.lang.String loadScriptEnv​(java.lang.String language, java.lang.String extension)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • extensions

        public static final java.util.Map<java.lang.String,​java.lang.String> extensions
        Mapping of known ScriptEngine language names and file extensions of corresponding script files.
    • Constructor Detail

      • SpinScriptEnv

        public SpinScriptEnv()
    • Method Detail

      • getExtension

        public static java.lang.String getExtension​(java.lang.String language)
        Get file extension for script language.
        Parameters:
        language - the language name
        Returns:
        the file extension as string or null if the language is not in the set of languages supported by spin
      • get

        public static java.lang.String get​(java.lang.String language)
        Get the spin scripting environment
        Parameters:
        language - the language name
        Returns:
        the environment script as string or null if the language is not in the set of languages supported by spin.
      • loadScriptEnv

        protected static java.lang.String loadScriptEnv​(java.lang.String language,
                                                        java.lang.String extension)