org.apache.commons.jexl.parser
Class ASTIdentifier

java.lang.Object
  extended byorg.apache.commons.jexl.parser.SimpleNode
      extended byorg.apache.commons.jexl.parser.ASTIdentifier
All Implemented Interfaces:
Node

public class ASTIdentifier
extends SimpleNode

Simple identifier - $foo or $foo.bar (both parts are identifiers...)

Version:
$Id: ASTIdentifier.java,v 1.5 2003/10/09 21:28:55 rdonkin Exp $
Author:
Geir Magnusson Jr.

Field Summary
protected  java.lang.String val
           
 
Fields inherited from class org.apache.commons.jexl.parser.SimpleNode
children, id, parent, parser
 
Constructor Summary
ASTIdentifier(int id)
           
ASTIdentifier(Parser p, int id)
           
 
Method Summary
 java.lang.Object execute(java.lang.Object obj, JexlContext jc)
          returns the value of itself applied to the object.
 java.lang.String getIdentifierString()
           
 java.lang.Object jjtAccept(ParserVisitor visitor, java.lang.Object data)
          Accept the visitor.
 java.lang.Object value(JexlContext jc)
          Returns the value of the node.
 
Methods inherited from class org.apache.commons.jexl.parser.SimpleNode
childrenAccept, dump, interpret, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, setValue, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

val

protected java.lang.String val
Constructor Detail

ASTIdentifier

public ASTIdentifier(int id)

ASTIdentifier

public ASTIdentifier(Parser p,
                     int id)
Method Detail

jjtAccept

public java.lang.Object jjtAccept(ParserVisitor visitor,
                                  java.lang.Object data)
Accept the visitor.

Specified by:
jjtAccept in interface Node
Overrides:
jjtAccept in class SimpleNode

value

public java.lang.Object value(JexlContext jc)
                       throws java.lang.Exception
Description copied from class: SimpleNode
Returns the value of the node.

Overrides:
value in class SimpleNode
Throws:
java.lang.Exception

execute

public java.lang.Object execute(java.lang.Object obj,
                                JexlContext jc)
                         throws java.lang.Exception
returns the value of itself applied to the object. We assume that an identifier can be gotten via a get(String)

Overrides:
execute in class SimpleNode
Throws:
java.lang.Exception

getIdentifierString

public java.lang.String getIdentifierString()