Copyright 2002 by aragost

com.aragost.araspect.evaluators
Class MapEvaluator

java.lang.Object
  |
  +--com.aragost.araspect.evaluators.Evaluator
        |
        +--com.aragost.araspect.evaluators.MapEvaluator
Direct Known Subclasses:
GenericMapEvaluator

public class MapEvaluator
extends Evaluator

An Evaluator to evaluate entries in a Map.


Constructor Summary
MapEvaluator()
           
 
Method Summary
 PathElement createPathElement(java.lang.Object key, int index)
          DOCUMENT ME!
static java.util.Iterator entrySetIterator(java.util.Map map)
          DOCUMENT ME!
 java.lang.Object eval(java.lang.Object arg, PathElement elm)
          Evaluate a PathElement for the specified Object.
static java.util.Map.Entry getEntryAtIndex(java.util.Map map, int index)
          DOCUMENT ME!
 java.lang.String id()
          Return a unique id for the receiver.
 java.lang.String prettyPrint(PathElement elm)
          DOCUMENT ME!
 
Methods inherited from class com.aragost.araspect.evaluators.Evaluator
get, getRegisteredEvaluators, register, register
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapEvaluator

public MapEvaluator()
Method Detail

createPathElement

public PathElement createPathElement(java.lang.Object key,
                                     int index)
DOCUMENT ME!

Parameters:
key - DOCUMENT ME!
index - DOCUMENT ME!
Returns:
DOCUMENT ME!

getEntryAtIndex

public static java.util.Map.Entry getEntryAtIndex(java.util.Map map,
                                                  int index)
DOCUMENT ME!

Parameters:
map - DOCUMENT ME!
index - DOCUMENT ME!
Returns:
DOCUMENT ME!

entrySetIterator

public static java.util.Iterator entrySetIterator(java.util.Map map)
DOCUMENT ME!

Parameters:
map - DOCUMENT ME!
Returns:
DOCUMENT ME!

id

public java.lang.String id()
Description copied from class: Evaluator
Return a unique id for the receiver. Only one Evaluator should return the same id.

Specified by:
id in class Evaluator
Returns:
String the id.
See Also:
Evaluator.id()

eval

public java.lang.Object eval(java.lang.Object arg,
                             PathElement elm)
                      throws EvaluationException
Description copied from class: Evaluator
Evaluate a PathElement for the specified Object. The receiver is assumed to be the Evaluator specified by the evaluatorId() of the PathElement.

Specified by:
eval in class Evaluator
Parameters:
arg -
elm -
Returns:
Object
Throws:
EvaluationException
See Also:
Evaluator.eval(Object, PathElement)

prettyPrint

public java.lang.String prettyPrint(PathElement elm)
DOCUMENT ME!

Overrides:
prettyPrint in class Evaluator
Parameters:
elm - DOCUMENT ME!
Returns:
DOCUMENT ME!

Copyright 2002 by aragost