|
Groovy Documentation | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.codehaus.groovy.antlr.treewalker.VisitorAdapter
org.codehaus.groovy.antlr.java.PreJava2GroovyConverter
public class PreJava2GroovyConverter extends VisitorAdapter
This class mutates the Java AST, whilst it is still a Java AST, in readiness for conversion to Groovy, yippee-ky-a !
| Constructor Summary | |
PreJava2GroovyConverter(java.lang.String[] tokenNames)
|
|
| Method Summary | |
|---|---|
GroovySourceAST
|
pop()
|
void
|
push(GroovySourceAST t)
|
void
|
swapTwoChildren(GroovySourceAST t)
To swap two children of node t... |
void
|
visitDefault(GroovySourceAST t, int visit)
|
| Methods inherited from class java.lang.Object | |
|---|---|
| java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
| Constructor Detail |
|---|
public PreJava2GroovyConverter(java.lang.String[] tokenNames)
| Method Detail |
|---|
public GroovySourceAST pop()
public void push(GroovySourceAST t)
public void swapTwoChildren(GroovySourceAST t)
(t)
|
|
(a) -- (b)
t.down = firstNode
a.right = b
b.right = null
becomes
(t)
|
|
(b) -- (a)
t.down = b
a.right = null
b.right = a
todo - build API of basic tree mutations like this method.
public void visitDefault(GroovySourceAST t, int visit)
Groovy Documentation