org.apache.jdo.impl.jdoql.jdoqlc
Class JDOQLAST

java.lang.Object
  extended byantlr.BaseAST
      extended byantlr.CommonAST
          extended byorg.apache.jdo.impl.jdoql.jdoqlc.JDOQLAST
All Implemented Interfaces:
antlr.collections.AST, java.lang.Cloneable, java.io.Serializable
Direct Known Subclasses:
NodeImpl

public class JDOQLAST
extends antlr.CommonAST
implements java.lang.Cloneable

This class represents a node in the intermediate representation (AST) used by the query compiler. It provides - line info - column info - type info (JavaType instance): the semantic analysis calculates the type of an expression and adds this info to each node.

Author:
Michael Bouschen
See Also:
Serialized Form

Field Summary
protected  int column
          The column info
protected  int line
          The line info
protected  JavaType typeInfo
          The type info
 
Fields inherited from class antlr.BaseAST
down, right
 
Constructor Summary
JDOQLAST()
           
JDOQLAST(int type, java.lang.String text, JavaType typeInfo)
           
JDOQLAST(JDOQLAST ast)
           
 
Method Summary
protected  java.lang.Object clone()
          Creates and returns a copy of this object.
 int getColumn()
           
 int getLine()
           
 JavaType getTypeInfo()
           
 void initialize(antlr.collections.AST _ast)
           
 void initialize(int type, java.lang.String text, JavaType typeInfo)
           
 void initialize(antlr.Token t)
           
 void setColumn(int column)
           
 void setLine(int line)
           
 void setTypeInfo(JavaType typeInfo)
           
 java.lang.String toString()
          Returns a string representation of this JDOQLAST.
 java.lang.String treeToString()
          Returns a string representation of this JDOQLAST including all child nodes.
 
Methods inherited from class antlr.CommonAST
getText, getType, initialize, setText, setType
 
Methods inherited from class antlr.BaseAST
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getFirstChild, getNextSibling, getNumberOfChildren, getTokenNames, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

line

protected int line
The line info


column

protected int column
The column info


typeInfo

protected transient JavaType typeInfo
The type info

Constructor Detail

JDOQLAST

public JDOQLAST()

JDOQLAST

public JDOQLAST(int type,
                java.lang.String text,
                JavaType typeInfo)

JDOQLAST

public JDOQLAST(JDOQLAST ast)
Method Detail

initialize

public void initialize(antlr.Token t)
Specified by:
initialize in interface antlr.collections.AST

initialize

public void initialize(int type,
                       java.lang.String text,
                       JavaType typeInfo)

initialize

public void initialize(antlr.collections.AST _ast)
Specified by:
initialize in interface antlr.collections.AST

setLine

public void setLine(int line)

getLine

public int getLine()
Specified by:
getLine in interface antlr.collections.AST

setColumn

public void setColumn(int column)

getColumn

public int getColumn()
Specified by:
getColumn in interface antlr.collections.AST

setTypeInfo

public void setTypeInfo(JavaType typeInfo)

getTypeInfo

public JavaType getTypeInfo()

toString

public java.lang.String toString()
Returns a string representation of this JDOQLAST.

Specified by:
toString in interface antlr.collections.AST
Returns:
a string representation of the object.

treeToString

public java.lang.String treeToString()
Returns a string representation of this JDOQLAST including all child nodes.

Returns:
a string representation of this JDOQLAST including all child nodes.

clone

protected java.lang.Object clone()
                          throws java.lang.CloneNotSupportedException
Creates and returns a copy of this object. The returned JDOQLAST shares the same state as this object, meaning the fields type, text, line, column, and typeInfo have the same values. But it is not bound to any tree structure, thus the child is null and the sibling is null.

Returns:
a clone of this instance.
Throws:
java.lang.CloneNotSupportedException


Copyright © 2005-2007 Apache Software Foundation. All Rights Reserved.