|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ASTVisitor
A Visitor which handles nodes in Derby's abstract syntax trees. In addition to this contract, it is expected that an ASTVisitor will have a 0-arg constructor. You use an ASTVisitor like this:
// initialize your visitor MyASTVisitor myVisitor = new MyASTVisitor(); myVisitor.initializeVisitor(); languageConnectionContext.setASTVisitor( myVisitor ); // then run your queries. ... // when you're done inspecting query trees, release resources and // remove your visitor languageConnectionContext.setASTVisitor( null ); myVisitor.teardownVisitor();
| Field Summary | |
|---|---|
static int |
AFTER_BIND
|
static int |
AFTER_OPTIMIZE
|
static int |
AFTER_PARSE
|
| Method Summary | |
|---|---|
void |
begin(String statementText,
int phase)
The compiler calls this method just before walking a query tree. |
void |
end(int phase)
The compiler calls this method when it's done walking a tree. |
void |
initializeVisitor()
Initialize the Visitor before processing any trees. |
void |
teardownVisitor()
Final call to the Visitor. |
| Methods inherited from interface com.akiban.sql.parser.Visitor |
|---|
skipChildren, stopTraversal, visit, visitChildrenFirst |
| Field Detail |
|---|
static final int AFTER_PARSE
static final int AFTER_BIND
static final int AFTER_OPTIMIZE
| Method Detail |
|---|
void initializeVisitor()
throws StandardException
StandardException
void teardownVisitor()
throws StandardException
StandardException
void begin(String statementText,
int phase)
throws StandardException
statementText - Text used to create the tree.phase - of compilation (AFTER_PARSE, AFTER_BIND, or AFTER_OPTIMIZE).
StandardException
void end(int phase)
throws StandardException
phase - of compilation (AFTER_PARSE, AFTER_BIND, or AFTER_OPTIMIZE).
StandardException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||