Griffon 0.9.5-rc2

griffon.util
[Java] Enum RunMode

java.lang.Object
  java.lang.Enum
      griffon.util.RunMode

public enum RunMode
extends Enum

An enum that represents the current running mode.

Authors:
Andres Almiray
Since:
0.3.1


Enum Constant Summary
APPLET

CUSTOM

STANDALONE

WEBSTART

 
Field Summary
private static String APPLET_RUNMODE_SHORT_NAME

static String DEFAULT

Constants that indicates whether this GriffonApplication is running in the default running mode

static String KEY

An enum that represents the current running mode.

private static String STANDALONE_RUNMODE_SHORT_NAME

private static String WEBSTART_RUNMODE_SHORT_NAME

private static HashMap modeNameMappings

private String name

 
Method Summary
static RunMode getCurrent()

Returns the current RunMode which is typically either STANDALONE, WEBSTART or APPLET.

static RunMode getCurrentRunMode()

@see #getCurrent()

String getName()

@return The name of the running mode

static RunMode getRunMode(String shortName)

Returns the running mode for the given short name

private static boolean isBlank(String value)

static boolean isSystemSet()

@return Return true if the running mode has been set as a System property

void setName(String name)

RunMode valueOf(String name)

Returns the enum constant of this type with the specified name.

RunMode[] values()

Returns an array containing the constants of this enum type, in the order they are declared.

 
Methods inherited from class Enum
name, equals, toString, hashCode, compareTo, compareTo, valueOf, getDeclaringClass, ordinal, wait, wait, wait, getClass, notify, notifyAll
 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Enum Constant Detail

APPLET

RunMode APPLET


CUSTOM

RunMode CUSTOM


STANDALONE

RunMode STANDALONE


WEBSTART

RunMode WEBSTART


 
Field Detail

APPLET_RUNMODE_SHORT_NAME

private static final String APPLET_RUNMODE_SHORT_NAME


DEFAULT

public static final String DEFAULT
Constants that indicates whether this GriffonApplication is running in the default running mode


KEY

public static final String KEY
An enum that represents the current running mode.
Authors:
Andres Almiray
Since:
0.3.1


STANDALONE_RUNMODE_SHORT_NAME

private static final String STANDALONE_RUNMODE_SHORT_NAME


WEBSTART_RUNMODE_SHORT_NAME

private static final String WEBSTART_RUNMODE_SHORT_NAME


modeNameMappings

private static HashMap modeNameMappings


name

private String name


 
Method Detail

getCurrent

public static RunMode getCurrent()
Returns the current RunMode which is typically either STANDALONE, WEBSTART or APPLET. For custom running modes CUSTOM type is returned.
Returns:
The current runMode.


getCurrentRunMode

public static RunMode getCurrentRunMode()
See Also:
getCurrent()


getName

public String getName()
Returns:
The name of the running mode


getRunMode

public static RunMode getRunMode(String shortName)
Returns the running mode for the given short name
Parameters:
shortName - The short name
Returns:
The RunMode or null if not known


isBlank

private static boolean isBlank(String value)


isSystemSet

public static boolean isSystemSet()
Returns:
Return true if the running mode has been set as a System property


setName

public void setName(String name)


valueOf

RunMode valueOf(String name)
Returns the enum constant of this type with the specified name.


values

RunMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared.


 

Groovy Documentation