ariba.util.expr
Class SimpleNode

java.lang.Object
  extended by ariba.util.expr.SimpleNode
All Implemented Interfaces:
Node, Serializable
Direct Known Subclasses:
ExpressionNode

public abstract class SimpleNode
extends Object
implements Node, Serializable

Author:
Luke Blanshard (blanshlu@netscape.net), Drew Davidson (drew@ognl.org)
See Also:
Serialized Form

Constructor Summary
SimpleNode(ariba.util.expr.ExprParser p, int i)
           
SimpleNode(int i)
           
 
Method Summary
 void accept(ASTNodeVisitor visitor)
           
 void dump(PrintWriter writer, String prefix)
           
 int getIndexInParent()
           
 Node getNextSibling()
           
 TypeInfo getTypeInfo()
           
 Object getValue(ExprContext context, Object source)
          Extracts the value from the given source object that is appropriate for this node within the given context.
 boolean isConstant(ExprContext context)
           
 boolean isNodeConstant(ExprContext context)
          Returns true iff this node is constant without respect to the children.
 boolean isNodeSimpleProperty(ExprContext context)
           
 boolean isSimpleNavigationChain(ExprContext context)
           
 boolean isSimpleProperty(ExprContext context)
           
 void jjtAddChild(Node n, int i)
          This method tells the node to add its argument to the node's list of children.
 void jjtClose()
          This method is called after all the child nodes have been added.
 Node jjtGetChild(int i)
          This method returns a child node.
 int jjtGetNumChildren()
          Return the number of children the node has.
 Node jjtGetParent()
           
 void jjtOpen()
          This method is called after the node has been made the current node.
 void jjtSetParent(Node n)
          This pair of methods are used to inform the node of its parent.
 void setTypeInfo(TypeInfo typeInfo)
           
 void setValue(ExprContext context, Object target, Object value)
          Sets the given value in the given target as appropriate for this node within the given context.
 String toString()
           
 String toString(String prefix)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleNode

public SimpleNode(int i)

SimpleNode

public SimpleNode(ariba.util.expr.ExprParser p,
                  int i)
Method Detail

jjtOpen

public void jjtOpen()
Description copied from interface: Node
This method is called after the node has been made the current node. It indicates that child nodes can now be added to it.

Specified by:
jjtOpen in interface Node

jjtClose

public void jjtClose()
Description copied from interface: Node
This method is called after all the child nodes have been added.

Specified by:
jjtClose in interface Node

jjtSetParent

public void jjtSetParent(Node n)
Description copied from interface: Node
This pair of methods are used to inform the node of its parent.

Specified by:
jjtSetParent in interface Node

jjtGetParent

public Node jjtGetParent()
Specified by:
jjtGetParent in interface Node

jjtAddChild

public void jjtAddChild(Node n,
                        int i)
Description copied from interface: Node
This method tells the node to add its argument to the node's list of children.

Specified by:
jjtAddChild in interface Node

jjtGetChild

public Node jjtGetChild(int i)
Description copied from interface: Node
This method returns a child node. The children are numbered from zero, left to right.

Specified by:
jjtGetChild in interface Node

jjtGetNumChildren

public int jjtGetNumChildren()
Description copied from interface: Node
Return the number of children the node has.

Specified by:
jjtGetNumChildren in interface Node

toString

public String toString()
Overrides:
toString in class Object

toString

public String toString(String prefix)

dump

public void dump(PrintWriter writer,
                 String prefix)

getIndexInParent

public int getIndexInParent()

getNextSibling

public Node getNextSibling()

getValue

public final Object getValue(ExprContext context,
                             Object source)
                      throws ExprException
Description copied from interface: Node
Extracts the value from the given source object that is appropriate for this node within the given context.

Specified by:
getValue in interface Node
Throws:
ExprException

setValue

public final void setValue(ExprContext context,
                           Object target,
                           Object value)
                    throws ExprException
Description copied from interface: Node
Sets the given value in the given target as appropriate for this node within the given context.

Specified by:
setValue in interface Node
Throws:
ExprException

isNodeConstant

public boolean isNodeConstant(ExprContext context)
                       throws ExprException
Returns true iff this node is constant without respect to the children.

Throws:
ExprException

isConstant

public boolean isConstant(ExprContext context)
                   throws ExprException
Throws:
ExprException

isNodeSimpleProperty

public boolean isNodeSimpleProperty(ExprContext context)
                             throws ExprException
Throws:
ExprException

isSimpleProperty

public boolean isSimpleProperty(ExprContext context)
                         throws ExprException
Throws:
ExprException

isSimpleNavigationChain

public boolean isSimpleNavigationChain(ExprContext context)
                                throws ExprException
Throws:
ExprException

accept

public void accept(ASTNodeVisitor visitor)
Specified by:
accept in interface Node

getTypeInfo

public TypeInfo getTypeInfo()
Specified by:
getTypeInfo in interface Node

setTypeInfo

public void setTypeInfo(TypeInfo typeInfo)
Specified by:
setTypeInfo in interface Node


AribaWeb User Interface Development Framework
Copyright © 2000-2009 Ariba, Inc. All Rights Reserved.