com.gridsystems.beanfilter
Class EvalNode

java.lang.Object
  extended by com.gridsystems.beanfilter.EvalValue
      extended by com.gridsystems.beanfilter.EvalNode
Direct Known Subclasses:
AndNode, BooleanNode, CollectionNode, CompareNode, NotNode, OrNode

public abstract class EvalNode
extends EvalValue

Evaluation tree node.

Version:
1.0
Author:
Rodrigo Ruiz, Xmas

Field Summary
 
Fields inherited from class com.gridsystems.beanfilter.EvalValue
BOOLEAN, COLLECTION, NUMBER, STRING, UNKNOWN, VOID
 
Constructor Summary
EvalNode(int linePos, int charPos)
          Creates a new instance.
 
Method Summary
abstract  boolean eval(java.lang.Object src)
          Evaluates the node.
 java.lang.Class<?> getClassValue(java.lang.Class<?> parentClass)
          
 java.lang.Object getValue(java.lang.Object src)
          Gets the value.
 
Methods inherited from class com.gridsystems.beanfilter.EvalValue
getCharPos, getLinePos
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvalNode

public EvalNode(int linePos,
                int charPos)
Creates a new instance.

Parameters:
linePos - The line token position
charPos - The char token position
Method Detail

getValue

public final java.lang.Object getValue(java.lang.Object src)
                                throws EvalException
Gets the value.

Specified by:
getValue in class EvalValue
Parameters:
src - The data source
Returns:
The value
Throws:
EvalException - FTR005: Unknown field path

getClassValue

public final java.lang.Class<?> getClassValue(java.lang.Class<?> parentClass)
                                       throws EvalException

Specified by:
getClassValue in class EvalValue
Parameters:
parentClass - Parent Class
Returns:
Return the Java Class that represents or null if it is unknown.
Throws:
EvalException - If an error occurs

eval

public abstract boolean eval(java.lang.Object src)
                      throws EvalException
Evaluates the node.

Parameters:
src - Data source, for dynamic nodes
Returns:
true if src makes true the node
Throws:
EvalException - If an error occurs


Copyright © 2007-2008 Grid Systems, S.A.. All Rights Reserved.