org.shiftone.jrat.core
Class Mode

java.lang.Object
  extended by org.shiftone.jrat.core.Mode

public class Mode
extends java.lang.Object

This has a bit of a smell to it. The problem is the system needs to know how it's being executed. In the case of runtime, it needs to read (and possibly column) files. In the case of desktop, that would be silly. The mode can be set multiple times, but once it's read it can not be set.

Author:
jeff@shiftone.org (Jeff Drost)

Field Summary
static Mode DESKTOP
           
static Mode RUNTIME
           
static Mode UNKNOWN
           
 
Constructor Summary
Mode(java.lang.String name, boolean environmentLoadingEnabled, int priority)
           
 
Method Summary
static Mode get()
           
 java.lang.String getName()
           
 boolean isEnvironmentLoadingEnabled()
           
static void set(Mode newMode)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNKNOWN

public static final Mode UNKNOWN

DESKTOP

public static final Mode DESKTOP

RUNTIME

public static final Mode RUNTIME
Constructor Detail

Mode

public Mode(java.lang.String name,
            boolean environmentLoadingEnabled,
            int priority)
Method Detail

getName

public java.lang.String getName()

isEnvironmentLoadingEnabled

public boolean isEnvironmentLoadingEnabled()

set

public static void set(Mode newMode)

get

public static Mode get()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object