|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MutableGenericContext
This is the interface for a context
that can be
modified.
Method Summary | |
---|---|
GenericContext |
getImmutableContext()
This method gets an immutable proxy of this context that can NOT be casted to MutableGenericContext . |
Object |
removeVariable(String variableName)
This method removes (unsets) the variable specified by variableName . |
Object |
setVariable(Object value)
This method sets the variable given by value . |
Object |
setVariable(String variableName,
Object value)
This method sets the variable specified by variableName to the
given value . |
Methods inherited from interface net.sf.mmm.util.context.api.GenericContext |
---|
createChildContext, getVariable, getVariable, getVariable, getVariableNames, hasVariable, requireVariable, requireVariable, requireVariable, toMap |
Method Detail |
---|
Object setVariable(String variableName, Object value)
variableName
to the
given value
. If the variable is already set, it will be
overridden.
variableName
- is the name of the variable to set.value
- is the value to assign to the variable.
null
if the variable was undefined or
NOT overridden in this context.GenericContext.getVariable(String)
Object setVariable(Object value)
value
. If the variable
is already set, it will be overridden. This method will use the
classname
as variable-name
.String
or Integer
are bad candidates while
MySpecificSingletonComponentInterface
might be a good option.
value
- is the value to assign to the variable.
null
if the variable was undefined or
NOT overridden in this context.GenericContext.getVariable(String)
,
GenericContext.getVariable(Class)
Object removeVariable(String variableName)
variableName
. This will only remove a variable defined in this
context. A variable inherited from a
parent context
can not be
removed here. set
a variable to null
instead.
variableName
- is the name of the variable to unset.
null
if the variable
is NOT defined (in this context).GenericContext getImmutableContext()
MutableGenericContext
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |