|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.stripes.util.bean.MapPropertyAccessor
public class MapPropertyAccessor
Implementation of 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 Summary | |
---|---|
MapPropertyAccessor()
|
Method Summary | |
---|---|
protected 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). |
Object |
getValue(NodeEvaluation evaluation,
Map<?,?> map)
Gets the value stored in the Map under the key specified by the current node. |
void |
setValue(NodeEvaluation evaluation,
Map map,
Object value)
Sets the value stored in the Map under the key specified by the current node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MapPropertyAccessor()
Method Detail |
---|
public Object getValue(NodeEvaluation evaluation, Map<?,?> map)
getValue
in interface PropertyAccessor<Map<?,?>>
evaluation
- the current node evaluationmap
- the target Map
public void setValue(NodeEvaluation evaluation, Map map, Object value)
setValue
in interface PropertyAccessor<Map<?,?>>
evaluation
- the current node evaluationmap
- the target Mapvalue
- the value to be stored in the map under the specified keyprotected Object getKey(NodeEvaluation evaluation)
evaluation
- the current node evaluation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |