Enum ScriptScopeStyle

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ScriptScopeStyle>

    public enum ScriptScopeStyle
    extends java.lang.Enum<ScriptScopeStyle>
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      Python21
      Python 2.1 scope style is how all scripts ran prior to Ignition 7.7.
      Python25
      Python 2.5 scope style is how many scripts run in Ignition 7.7 and later.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String toString()  
      static ScriptScopeStyle valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static ScriptScopeStyle[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • Python21

        public static final ScriptScopeStyle Python21
        Python 2.1 scope style is how all scripts ran prior to Ignition 7.7. This scope style meant that all scripts executed by a ScriptManager shared the same globals map. The downside of this scoping style is that methods defined in a module were unable to reference other names defined by that module.
      • Python25

        public static final ScriptScopeStyle Python25
        Python 2.5 scope style is how many scripts run in Ignition 7.7 and later. This scope style gives each script module its own global scope. The class global scope can still be referenced through system.util.getGlobals()
    • Method Detail

      • values

        public static ScriptScopeStyle[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ScriptScopeStyle c : ScriptScopeStyle.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ScriptScopeStyle valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<ScriptScopeStyle>