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
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe column infoprotected intThe line infoprotected ObjectThe type infoFields inherited from class antlr.BaseAST
down, right -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Objectclone()Creates and returns a copy of this object.intintgetLine()getTreeRepr(String title) Returns a full string representation of this JQLAST.voidinitialize(int type, String text, Object typeInfo) voidinitialize(antlr.collections.AST _ast) voidinitialize(antlr.Token t) voidsetColumn(int column) voidsetLine(int line) voidsetTypeInfo(Object typeInfo) toString()Returns a string representation of this EJBQLAST w/o child ast nodes.Methods inherited from class antlr.CommonAST
getText, getType, initialize, setText, setTypeMethods 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 Details
-
line
protected int lineThe line info -
column
protected int columnThe column info -
typeInfo
The type info
-
-
Constructor Details
-
EJBQLAST
public EJBQLAST()No args constructor. -
EJBQLAST
Constructor taking token type, text and type info. -
EJBQLAST
Copy constructor.
-
-
Method Details
-
initialize
public void initialize(antlr.Token t) - Specified by:
initializein interfaceantlr.collections.AST- Overrides:
initializein classantlr.CommonAST
-
initialize
-
initialize
public void initialize(antlr.collections.AST _ast) - Specified by:
initializein interfaceantlr.collections.AST- Overrides:
initializein classantlr.CommonAST
-
setLine
public void setLine(int line) -
getLine
public int getLine()- Specified by:
getLinein interfaceantlr.collections.AST- Overrides:
getLinein classantlr.BaseAST
-
setColumn
public void setColumn(int column) -
getColumn
public int getColumn()- Specified by:
getColumnin interfaceantlr.collections.AST- Overrides:
getColumnin classantlr.BaseAST
-
setTypeInfo
-
getTypeInfo
-
toString
Returns a string representation of this EJBQLAST w/o child ast nodes.- Specified by:
toStringin interfaceantlr.collections.AST- Overrides:
toStringin classantlr.BaseAST- Returns:
- a string representation of the object.
-
getTreeRepr
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
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:
clonein classObject- Returns:
- a clone of this instance.
- Throws:
CloneNotSupportedException
-