org.beanfabrics
Class PathEvaluation

java.lang.Object
  extended by org.beanfabrics.PathEvaluation
All Implemented Interfaces:
java.lang.Iterable<PathEvaluation.Entry>

public class PathEvaluation
extends java.lang.Object
implements java.lang.Iterable<PathEvaluation.Entry>


Nested Class Summary
 class PathEvaluation.Entry
           
 
Constructor Summary
PathEvaluation(PresentationModel root, Path path)
           
 
Method Summary
static PresentationModel evaluate(PresentationModel root, Path path)
          Evaluates the given path at the given root and returns the value at the end.
static PresentationModel evaluateOrNull(PresentationModel root, Path path)
          Evaluates the given path at the given root and returns the value at the end if it can be found, null otherwise.
 PathEvaluation.Entry getLastEntry()
           
 Path getPath()
           
 int getResolvedLength()
           
 Path getResolvedPath()
           
 PathEvaluation.Entry getResult()
           
 PresentationModel getRoot()
           
 boolean isCompletelyResolved()
           
 java.util.Iterator<PathEvaluation.Entry> iterator()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathEvaluation

public PathEvaluation(PresentationModel root,
                      Path path)
Method Detail

getRoot

public PresentationModel getRoot()

getResolvedLength

public int getResolvedLength()

isCompletelyResolved

public boolean isCompletelyResolved()

getPath

public Path getPath()

getResolvedPath

public Path getResolvedPath()

iterator

public java.util.Iterator<PathEvaluation.Entry> iterator()

Specified by:
iterator in interface java.lang.Iterable<PathEvaluation.Entry>

getLastEntry

public PathEvaluation.Entry getLastEntry()

getResult

public PathEvaluation.Entry getResult()

evaluate

public static PresentationModel evaluate(PresentationModel root,
                                         Path path)
                                  throws java.lang.IllegalArgumentException,
                                         EvaluationException
Evaluates the given path at the given root and returns the value at the end.

Parameters:
root -
path -
Throws:
java.lang.IllegalArgumentException
EvaluationException

evaluateOrNull

public static PresentationModel evaluateOrNull(PresentationModel root,
                                               Path path)
                                        throws java.lang.IllegalArgumentException
Evaluates the given path at the given root and returns the value at the end if it can be found, null otherwise.

Parameters:
root -
path -
Throws:
java.lang.IllegalArgumentException