Copyright 2002 by aragost

com.aragost.araspect.evaluators
Class CollectionEvaluator

java.lang.Object
  |
  +--com.aragost.araspect.evaluators.Evaluator
        |
        +--com.aragost.araspect.evaluators.CollectionEvaluator

public class CollectionEvaluator
extends Evaluator


Constructor Summary
CollectionEvaluator()
           
 
Method Summary
 PathElement createPathElement(int i)
          Create a path element that will will index into a collection
 java.lang.Object eval(java.lang.Object arg, PathElement elm)
          Evaluate a PathElement for the specified Object.
 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

CollectionEvaluator

public CollectionEvaluator()
Method Detail

createPathElement

public PathElement createPathElement(int i)
Create a path element that will will index into a collection

Parameters:
i - The index
Returns:

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)

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()

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