Class JQLAST
- java.lang.Object
-
- antlr.BaseAST
-
- antlr.CommonAST
-
- com.sun.jdo.spi.persistence.support.sqlstore.query.jqlc.JQLAST
-
- All Implemented Interfaces:
antlr.collections.AST,Serializable
public class JQLAST extends antlr.CommonASTThis class represents a node in the intermediate representation (AST) used by the query compiler. It provides - line info - column info - type info (object of class util.type.Type): the semantic analysis calculates the type of an expression and adds this info to each node. - RetrieveDesc info - value: this allows to add an arbitrary value to a node. This is used in compile time calulation of constant expression.- Version:
- 0.1
- Author:
- Michael Bouschen
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJQLAST.FactoryFactory to create and connect JQLAST nodes.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColumn()TypegetJQLType()intgetLine()RetrieveDescgetRetrieveDesc()static StringgetRetrieveDescRepr(RetrieveDesc rd)Returns a string representation of the spceified RetrieveDesc.StringgetTreeRepr(String title)Returns a full string representation of this JQLAST.ObjectgetValue()voidinitialize(int type)voidinitialize(int type, String text)voidinitialize(int type, String text, Type jqlType)voidinitialize(int type, String text, Type jqlType, Object value)voidinitialize(antlr.collections.AST ast)voidinitialize(antlr.Token t)voidinitialize(JQLAST ast)voidsetColumn(int column)voidsetJQLType(Type jqlType)voidsetLine(int line)voidsetRetrieveDesc(RetrieveDesc rd)voidsetValue(Object value)StringtoString()Returns a string representation of this JQLAST w/o child 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
-
column
protected int column
-
jqlType
protected Type jqlType
-
rd
protected RetrieveDesc rd
-
value
protected Object value
-
-
Method Detail
-
initialize
public void initialize(int type)
-
initialize
public void initialize(int type, String text)- Specified by:
initializein interfaceantlr.collections.AST- Overrides:
initializein classantlr.CommonAST
-
initialize
public void initialize(antlr.Token t)
- Specified by:
initializein interfaceantlr.collections.AST- Overrides:
initializein classantlr.CommonAST
-
initialize
public void initialize(antlr.collections.AST ast)
- Specified by:
initializein interfaceantlr.collections.AST- Overrides:
initializein classantlr.CommonAST
-
initialize
public void initialize(JQLAST ast)
-
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
-
setJQLType
public void setJQLType(Type jqlType)
-
getJQLType
public Type getJQLType()
-
setRetrieveDesc
public void setRetrieveDesc(RetrieveDesc rd)
-
getRetrieveDesc
public RetrieveDesc getRetrieveDesc()
-
setValue
public void setValue(Object value)
-
getValue
public Object getValue()
-
toString
public String toString()
Returns a string representation of this JQLAST w/o child nodes.- Specified by:
toStringin interfaceantlr.collections.AST- Overrides:
toStringin 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.
-
getRetrieveDescRepr
public static String getRetrieveDescRepr(RetrieveDesc rd)
Returns a string representation of the spceified RetrieveDesc.
-
-