kawigi.util
Enum AppEnvironment

java.lang.Object
  extended by java.lang.Enum<AppEnvironment>
      extended by kawigi.util.AppEnvironment
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<AppEnvironment>

public enum AppEnvironment
extends java.lang.Enum<AppEnvironment>

This enum class tells us whether we're in plugin mode or standalone mode.


Enum Constant Summary
ApplicationMode
          The mode we're in if KawigiEdit is being run as a standalone application.
PluginMode
          The mode we're in if we're being loaded as a plugin.
UndefinedMode
          As its name implies, this is when there is no mode set.
 
Field Summary
static java.lang.String VERSION
          The current KawigiEdit version.
 
Method Summary
static AppEnvironment getEnvironment()
          Returns the current application mode.
static void setEnvironment(AppEnvironment env)
          Sets the current application mode.
static AppEnvironment valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static AppEnvironment[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UndefinedMode

public static final AppEnvironment UndefinedMode
As its name implies, this is when there is no mode set.


PluginMode

public static final AppEnvironment PluginMode
The mode we're in if we're being loaded as a plugin. TopCoder classes are expected to be used.


ApplicationMode

public static final AppEnvironment ApplicationMode
The mode we're in if KawigiEdit is being run as a standalone application. TopCoder classes will not be used and do not need to be in the classpath in this mode.

Field Detail

VERSION

public static final java.lang.String VERSION
The current KawigiEdit version.

See Also:
Constant Field Values
Method Detail

values

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

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static AppEnvironment 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

setEnvironment

public static void setEnvironment(AppEnvironment env)
Sets the current application mode.


getEnvironment

public static AppEnvironment getEnvironment()
Returns the current application mode.