|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.mmm.util.context.base.AbstractMutableGenericContext
net.sf.mmm.util.context.impl.MutableGenericContextImpl
public class MutableGenericContextImpl
This is the implementation of the MutableGenericContext
interface.
Field Summary | |
---|---|
private GenericValueConverter<Object> |
valueConverter
|
Constructor Summary | |
---|---|
MutableGenericContextImpl(MapFactory<? extends Map> mapFactory)
The constructor for a root-context. |
|
MutableGenericContextImpl(MapFactory<? extends Map> mapFactory,
GenericContext parentContext)
The constructor for a sub-context . |
|
MutableGenericContextImpl(MapFactory<? extends Map> mapFactory,
GenericContext parentContext,
GenericValueConverter<Object> valueConverter)
The constructor for a sub-context . |
|
MutableGenericContextImpl(MapFactory<? extends Map> mapFactory,
GenericValueConverter<Object> valueConverter)
The constructor for a sub-context . |
Method Summary | ||
---|---|---|
MutableGenericContext |
createChildContext()
This method creates a new context that inherits all variables from this context (and its parent contexts). |
|
|
getVariable(String variableName,
Class<T> type)
This method gets the variable associated with the given variableName as the given type . |
Methods inherited from class net.sf.mmm.util.context.base.AbstractMutableGenericContext |
---|
getImmutableContext, getMapFactory, getVariable, getVariable, getVariableName, getVariableNames, hasVariable, removeVariable, requireVariable, requireVariable, requireVariable, setVariable, setVariable, toMap |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final GenericValueConverter<Object> valueConverter
getVariable(String, Class)
Constructor Detail |
---|
public MutableGenericContextImpl(MapFactory<? extends Map> mapFactory)
mapFactory
- is used to create the map for storing variables.public MutableGenericContextImpl(MapFactory<? extends Map> mapFactory, GenericValueConverter<Object> valueConverter)
sub-context
.
mapFactory
- is used to create the map for storing variables.valueConverter
- is the GenericValueConverter
used to convert
variables that are requested
as
a different type.public MutableGenericContextImpl(MapFactory<? extends Map> mapFactory, GenericContext parentContext)
sub-context
.
mapFactory
- is used to create the map for storing variables.parentContext
- is the context the created one will derive from.public MutableGenericContextImpl(MapFactory<? extends Map> mapFactory, GenericContext parentContext, GenericValueConverter<Object> valueConverter)
sub-context
.
mapFactory
- is used to create the map for storing variables.parentContext
- is the context the created one will derive from.valueConverter
- is the GenericValueConverter
used to convert
variables that are requested
as
a different type.Method Detail |
---|
public <T> T getVariable(String variableName, Class<T> type)
variableName
as the given type
. If the
type
does NOT match the actual type of the variable it may
automatically be converted as possible.
T
- the generic type of the variable.variableName
- is the name of the requested variable.type
- is the class reflecting the type of the variable.
null
if the variable is
NOT set.public MutableGenericContext createChildContext()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |