|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.drjava.config.PropertyMaps
public final class PropertyMaps
Class representing all the variables that can be inserted as variables in external processes.
| Field Summary | |
|---|---|
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,DrJavaProperty>> |
_props
Map of property sets. |
protected java.util.HashMap<java.lang.String,java.util.Stack<VariableProperty>> |
_variables
|
static Lambda2<DrJavaProperty,PropertyMaps,java.lang.String> |
GET_CURRENT
A lambda to use the getCurrent() method, which forces an update. |
static Lambda2<DrJavaProperty,PropertyMaps,java.lang.String> |
GET_LAZY
A lambda to use the getLazy() method, which does not force an update and might be stale. |
static PropertyMaps |
TEMPLATE
Template instance. |
protected static java.lang.String |
VARIABLES_CATEGORY
|
| Constructor Summary | |
|---|---|
PropertyMaps()
Create the basic property maps. |
|
| Method Summary | |
|---|---|
void |
addVariable(java.lang.String name,
java.lang.String value)
Add a variable with the specified name and value, shadowing previous definitions of the variable. |
void |
clearCategory(java.lang.String category)
Clear the specified category. |
void |
clearVariables()
Clear all user-defined variables. |
PropertyMaps |
clone()
Clone this PropertyMaps object. |
java.util.Set<java.lang.String> |
getCategories()
Return the set of categories. |
java.util.Map<java.lang.String,DrJavaProperty> |
getProperties(java.lang.String category)
Return the properties in a category. |
DrJavaProperty |
getProperty(java.lang.String key)
Search through all categories and return the property requested, or null if not found. |
DrJavaProperty |
getProperty(java.lang.String category,
java.lang.String name)
Return the property requested, or null if not found. |
void |
removeProperty(DrJavaProperty p)
Remove the specified property. |
void |
removeVariable(java.lang.String name)
Remove the variable with the specified name, unshadowing previous definitions of the variable. |
DrJavaProperty |
setProperty(java.lang.String category,
DrJavaProperty p)
Add a property. |
void |
setVariable(java.lang.String name,
java.lang.String value)
Mutate the value of a variable with the specified name. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,DrJavaProperty>> _props
public static final PropertyMaps TEMPLATE
public static final Lambda2<DrJavaProperty,PropertyMaps,java.lang.String> GET_LAZY
public static final Lambda2<DrJavaProperty,PropertyMaps,java.lang.String> GET_CURRENT
protected java.util.HashMap<java.lang.String,java.util.Stack<VariableProperty>> _variables
protected static final java.lang.String VARIABLES_CATEGORY
| Constructor Detail |
|---|
public PropertyMaps()
| Method Detail |
|---|
public DrJavaProperty getProperty(java.lang.String category,
java.lang.String name)
category - name of the categoryname - name of the property
java.lang.IllegalArgumentException - if category is not known.public DrJavaProperty getProperty(java.lang.String key)
key - key of the property
public void removeProperty(DrJavaProperty p)
p - property to remove
public DrJavaProperty setProperty(java.lang.String category,
DrJavaProperty p)
public void clearCategory(java.lang.String category)
public java.util.Set<java.lang.String> getCategories()
public java.util.Map<java.lang.String,DrJavaProperty> getProperties(java.lang.String category)
java.lang.IllegalArgumentException - if category is not known.public void clearVariables()
public void addVariable(java.lang.String name,
java.lang.String value)
name - name of the variablevalue - value of the variable
java.lang.IllegalArgumentException - if the name is already used for a built-in property
public void setVariable(java.lang.String name,
java.lang.String value)
name - name of the variablevalue - new value of the variable
java.lang.IllegalArgumentException - if a variable with name does not existpublic void removeVariable(java.lang.String name)
name - of the variable
java.lang.IllegalArgumentException - if no variable with that name exists
public PropertyMaps clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||