Class EJBQLAST
- java.lang.Object
-
- antlr.BaseAST
-
- antlr.CommonAST
-
- 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:- token type info
- token text
- line info
- column info
- type info the semantic analysis calculates the type of an expression and adds this info to each node.
- Author:
- Michael Bouschen
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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(int type, String text, Object typeInfo)
void
initialize(antlr.collections.AST _ast)
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.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
-
-
-
-
Field Detail
-
line
protected int line
The line info
-
column
protected int column
The column info
-
typeInfo
protected transient Object typeInfo
The type info
-
-
Method Detail
-
initialize
public void initialize(antlr.Token t)
- Specified by:
initialize
in interfaceantlr.collections.AST
- Overrides:
initialize
in classantlr.CommonAST
-
initialize
public void initialize(antlr.collections.AST _ast)
- Specified by:
initialize
in interfaceantlr.collections.AST
- Overrides:
initialize
in classantlr.CommonAST
-
setLine
public void setLine(int line)
-
getLine
public int getLine()
- Specified by:
getLine
in interfaceantlr.collections.AST
- Overrides:
getLine
in classantlr.BaseAST
-
setColumn
public void setColumn(int column)
-
getColumn
public int getColumn()
- Specified by:
getColumn
in interfaceantlr.collections.AST
- Overrides:
getColumn
in classantlr.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 interfaceantlr.collections.AST
- Overrides:
toString
in classantlr.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 classObject
- Returns:
- a clone of this instance.
- Throws:
CloneNotSupportedException
-
-