net.sourceforge.stripes.util.bean
Class Node

java.lang.Object
  extended by net.sourceforge.stripes.util.bean.Node

public class Node
extends Object

Represents a single node in a PropertyExpression. Note that Nodes are static and are tied to an expression, not an expression evaluation. Each node stores the original String value of the node as well as a typed value which can also be a String or one of the built in types such as Integer, Long, Boolean.

Since:
Stripes 1.4
Author:
Tim Fennell

Constructor Summary
Node(String value, Object typedValue)
          Constructs a new node with the String value and typed value provided.
 
Method Summary
 Class<? extends Object> getExpresssionNodeType()
          Returns the Java type of this node in the expression.
 Node getNext()
          Gets the next node in the expression.
 Node getPrevious()
          Gets the previous node in the expression.
 String getStringValue()
          Returns the original String value of this expression node.
 Object getTypedValue()
          Returns the typed value for this node as determined when parsing the expression
protected  void setNext(Node next)
          Sets the next node in the expression.
protected  void setPrevious(Node previous)
          Sets the previous node in the expression.
 String toString()
          Simple toString that returns the text that constructed this node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Node

public Node(String value,
            Object typedValue)
Constructs a new node with the String value and typed value provided.

Method Detail

getExpresssionNodeType

public Class<? extends Object> getExpresssionNodeType()
Returns the Java type of this node in the expression. Specifically this is the type determined for the text in this node, not the type of the property/sub-property represented by this node in an evaluation against a specific bean.


getStringValue

public String getStringValue()
Returns the original String value of this expression node.

Returns:
the original String value

getTypedValue

public Object getTypedValue()
Returns the typed value for this node as determined when parsing the expression

Returns:
the typed value (may also be a String)

getNext

public Node getNext()
Gets the next node in the expression. Returns null if this is the terminal node.


setNext

protected void setNext(Node next)
Sets the next node in the expression.


getPrevious

public Node getPrevious()
Gets the previous node in the expression. Returns null if this is the first node.


setPrevious

protected void setPrevious(Node previous)
Sets the previous node in the expression.


toString

public String toString()
Simple toString that returns the text that constructed this node.

Overrides:
toString in class Object


? Copyright 2005-2006, Stripes Development Team.