|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.drjava.config.Configuration
public class Configuration
Class to store and retrieve all configurable options.
| Field Summary | |
|---|---|
protected Exception |
_startupException
Any exception that is caught when initializing this Configuration object. |
protected OptionMap |
map
OptionMap used to store all option settings. |
| Constructor Summary | |
|---|---|
Configuration(OptionMap om)
Initializes this Configuration object with the given OptionMap. |
|
| Method Summary | ||
|---|---|---|
|
addOptionListener(Option<T> op,
OptionListener<T> l)
Adds an OptionListener to the given Option, to be notified each time the option changes. |
|
OptionMap |
getOptionMap()
Return OptionMap. |
|
|
getSetting(Option<T> op)
Gets the current value of the given Option. |
|
Exception |
getStartupException()
Returns the exception caught during startUp, or null if none were caught. |
|
boolean |
hadStartupException()
Returns whether there were any exceptions when starting. |
|
|
removeOptionListener(Option<T> op,
OptionListener<T> l)
Removes an OptionListener from an Option to which it was listening. |
|
void |
resetToDefaults()
Resets to the default values, overwriting any existing values. |
|
|
setSetting(Option<T> op,
T value)
Sets the given option to the given value and notifies all listeners of that option of the change. |
|
void |
storeStartupException(Exception e)
Stores exception caught during creation of this Configuration object, so it can be displayed later by the UI. |
|
String |
toString()
Returns a string representation of the contents of the OptionMap. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected volatile OptionMap map
protected volatile Exception _startupException
| Constructor Detail |
|---|
public Configuration(OptionMap om)
om - An empty OptionMap.| Method Detail |
|---|
public <T> T setSetting(Option<T> op,
T value)
op - Option to setvalue - New value for the optionpublic <T> T getSetting(Option<T> op)
public <T> void addOptionListener(Option<T> op,
OptionListener<T> l)
op - Option to listen for changes onl - OptionListener wishing to listen
public <T> void removeOptionListener(Option<T> op,
OptionListener<T> l)
public void resetToDefaults()
public boolean hadStartupException()
public Exception getStartupException()
public void storeStartupException(Exception e)
e - Exception caught during startUppublic String toString()
toString in class Objectpublic OptionMap getOptionMap()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||