public interface MutableGenericContext extends GenericContext
context that can be modified.| Modifier and Type | Method and Description |
|---|---|
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. |
createChildContext, getVariable, getVariable, getVariable, getVariableNames, hasVariable, requireVariable, requireVariable, requireVariable, toMapObject 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.Copyright © 2001–2016 mmm-Team. All rights reserved.