public class MapPropertyAccessor extends java.lang.Object implements PropertyAccessor<java.util.Map<?,?>>
PropertyAccessor
for interacting with Maps. Uses information
stored in the node evaluation to determine the correct type for the Map key and converts
the key using Stripes' type conversion system.Constructor and Description |
---|
MapPropertyAccessor() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
getKey(NodeEvaluation evaluation)
Attempts to convert the key to from the expression node to the correct type
as determined by reflection (using generics to find the Map key type).
|
java.lang.Object |
getValue(NodeEvaluation evaluation,
java.util.Map<?,?> map)
Gets the value stored in the Map under the key specified by the current node.
|
void |
setValue(NodeEvaluation evaluation,
java.util.Map map,
java.lang.Object value)
Sets the value stored in the Map under the key specified by the current node.
|
public java.lang.Object getValue(NodeEvaluation evaluation, java.util.Map<?,?> map)
getValue
in interface PropertyAccessor<java.util.Map<?,?>>
evaluation
- the current node evaluationmap
- the target Mappublic void setValue(NodeEvaluation evaluation, java.util.Map map, java.lang.Object value)
setValue
in interface PropertyAccessor<java.util.Map<?,?>>
evaluation
- the current node evaluationmap
- the target Mapvalue
- the value to be stored in the map under the specified keyprotected java.lang.Object getKey(NodeEvaluation evaluation)
evaluation
- the current node evaluation? Copyright 2005-2006, Stripes Development Team.