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.CommonAST
This 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 class
JQLAST.Factory
Factory to create and connect JQLAST nodes.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getColumn()
Type
getJQLType()
int
getLine()
RetrieveDesc
getRetrieveDesc()
static String
getRetrieveDescRepr(RetrieveDesc rd)
Returns a string representation of the spceified RetrieveDesc.String
getTreeRepr(String title)
Returns a full string representation of this JQLAST.Object
getValue()
void
initialize(int type)
void
initialize(int type, String text)
void
initialize(int type, String text, Type jqlType)
void
initialize(int type, String text, Type jqlType, Object value)
void
initialize(antlr.collections.AST ast)
void
initialize(antlr.Token t)
void
initialize(JQLAST ast)
void
setColumn(int column)
void
setJQLType(Type jqlType)
void
setLine(int line)
void
setRetrieveDesc(RetrieveDesc rd)
void
setValue(Object value)
String
toString()
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:
initialize
in interfaceantlr.collections.AST
- Overrides:
initialize
in classantlr.CommonAST
-
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
-
initialize
public void initialize(JQLAST ast)
-
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
-
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:
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.
-
getRetrieveDescRepr
public static String getRetrieveDescRepr(RetrieveDesc rd)
Returns a string representation of the spceified RetrieveDesc.
-
-