|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Node
All AST nodes must implement this interface. It provides basic machinery for constructing the parent and child relationships between nodes.
Note: some methods defined in the interface begin with "jjt", which is a common convention of JavaCC, since we use it as the default parser generator.
Method Summary | |
---|---|
boolean |
exists()
|
org.eclipse.jface.text.IDocument |
getDocument()
|
int |
getEndOffset()
Before you call this method, make sure setDocument has been called. |
int |
getEndOffset(org.eclipse.jface.text.IDocument document)
|
Token |
getFirstToken()
|
int |
getGreatestEndOffset()
this method differs with getEndOffset in that it takes the trailing spaces into account. |
int |
getGreatestEndOffset(org.eclipse.jface.text.IDocument document)
this method differs with getEndOffset in that it takes the trailing spaces into account |
Token |
getLastToken()
|
int |
getNextTokenOffset()
|
int |
getNextTokenOffset(org.eclipse.jface.text.IDocument document)
|
Node |
getPreviousNode()
Gets previous node |
java.lang.String |
getSQLText()
Before you call this method, make sure setDocument has been called. |
int |
getStartOffset()
Before you call this method, make sure setDocument has been called. |
int |
getStartOffset(org.eclipse.jface.text.IDocument document)
|
java.lang.Object |
jjtAccept(ISQLParserVisitor visitor,
java.lang.Object data)
Accepts the visitor. |
void |
jjtAddChild(Node n,
int i)
This method tells the node to add its argument to the node's list of children. |
void |
jjtClose()
This method is called after all the child nodes have been added. |
Node |
jjtGetChild(int i)
This method returns a child node. |
int |
jjtGetNumChildren()
Return the number of children the node has. |
Node |
jjtGetParent()
|
void |
jjtOpen()
This method is called after the node has been made the current node. |
void |
jjtSetParent(Node n)
This pair of methods are used to inform the node of its parent. |
void |
setDocument(org.eclipse.jface.text.IDocument document)
Associate this Node with the IDocument |
void |
setFirstToken(Token token)
|
void |
setLastToken(Token token)
|
Method Detail |
---|
void jjtOpen()
void jjtClose()
void jjtSetParent(Node n)
Node jjtGetParent()
void jjtAddChild(Node n, int i)
Node jjtGetChild(int i)
int jjtGetNumChildren()
Token getLastToken()
void setLastToken(Token token)
Token getFirstToken()
void setFirstToken(Token token)
int getStartOffset(org.eclipse.jface.text.IDocument document)
viewer
- where the node is displayedgetStartOffset()
int getEndOffset(org.eclipse.jface.text.IDocument document)
viewer
- where the node is displayedgetGreatestEndOffset
,
getEndOffset()
int getGreatestEndOffset(org.eclipse.jface.text.IDocument document)
viewer
- where the node is displayedgetGreatestEndOffset()
void setDocument(org.eclipse.jface.text.IDocument document)
input
- org.eclipse.jface.text.IDocument getDocument()
int getStartOffset()
int getEndOffset()
getGreatestEndOffset
int getGreatestEndOffset()
java.lang.String getSQLText()
int getNextTokenOffset()
int getNextTokenOffset(org.eclipse.jface.text.IDocument document)
Node getPreviousNode()
document
-
java.lang.Object jjtAccept(ISQLParserVisitor visitor, java.lang.Object data)
visitor
- the visitor to be accepteddata
- accessorial data
boolean exists()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |