com.sun.jdo.spi.persistence.support.ejb.ejbqlc
Class EJBQLAST

java.lang.Object
  extended by antlr.BaseAST
      extended by antlr.CommonAST
          extended by com.sun.jdo.spi.persistence.support.ejb.ejbqlc.EJBQLAST
All Implemented Interfaces:
antlr.collections.AST, Serializable, Cloneable

public class EJBQLAST
extends antlr.CommonAST
implements Cloneable

An instance of this class represents a node of the intermediate representation (AST) used by the query compiler. It stores per node:

Author:
Michael Bouschen
See Also:
Serialized Form

Field Summary
protected  int column
          The column info
protected  int line
          The line info
protected  Object typeInfo
          The type info
 
Fields inherited from class antlr.BaseAST
down, right
 
Constructor Summary
EJBQLAST()
          No args constructor.
EJBQLAST(EJBQLAST ast)
          Copy constructor.
EJBQLAST(int type, String text, Object typeInfo)
          Constructor taking token type, text and type info.
 
Method Summary
protected  Object clone()
          Creates and returns a copy of this object.
 int getColumn()
           
 int getLine()
           
 String getTreeRepr(String title)
          Returns a full string representation of this JQLAST.
 Object getTypeInfo()
           
 void initialize(antlr.collections.AST _ast)
           
 void initialize(int type, String text, Object typeInfo)
           
 void initialize(antlr.Token t)
           
 void setColumn(int column)
           
 void setLine(int line)
           
 void setTypeInfo(Object typeInfo)
           
 String toString()
          Returns a string representation of this EJBQLAST w/o child ast 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 Object typeInfo
The type info

Constructor Detail

EJBQLAST

public EJBQLAST()
No args constructor.


EJBQLAST

public EJBQLAST(int type,
                String text,
                Object typeInfo)
Constructor taking token type, text and type info.


EJBQLAST

public EJBQLAST(EJBQLAST ast)
Copy constructor.

Method Detail

initialize

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

initialize

public void initialize(int type,
                       String text,
                       Object typeInfo)

initialize

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

setLine

public void setLine(int line)

getLine

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

setColumn

public void setColumn(int column)

getColumn

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

setTypeInfo

public void setTypeInfo(Object typeInfo)

getTypeInfo

public Object getTypeInfo()

toString

public String toString()
Returns a string representation of this EJBQLAST w/o child ast nodes.

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

getTreeRepr

public String getTreeRepr(String title)
Returns a full string representation of this JQLAST. The returned string starts with the specified title string, followed by the string representation of this ast, followed by the string representation of the child ast nodes of this ast. The method dumps each ast node on a separate line. Child ast nodes are indented. The method calls toString to dump a single node w/o children.

Returns:
string representation of this ast including children.

clone

protected Object clone()
                throws CloneNotSupportedException
Creates and returns a copy of this object. The returned EJBQLAST 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.

Overrides:
clone in class Object
Returns:
a clone of this instance.
Throws:
CloneNotSupportedException


Copyright © 2012. All Rights Reserved.