Overview | Package | Class
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.antlr.java
Class PreJava2GroovyConverter

This class mutates the Java AST, whilst it is still a Java AST, in readiness for conversion to Groovy, yippee-ky-a !

Field Summary
`Stack` | `stack`
`def` | `tokenNames`

Constructor Summary
`PreJava2GroovyConverter(def tokenNames)`

Method Summary
`GroovySourceAST` | `getGrandParentNode()`
`GroovySourceAST` | `getParentNode()`
`GroovySourceAST` | `pop()`
`void` | `push(GroovySourceAST t)`
`void` | `swapTwoChildren(GroovySourceAST t)` To swap two children of node t...
`void` | `visitDefault(GroovySourceAST t, int visit)`
`void` | `visitJavaArrayInit(GroovySourceAST t)`
`void` | `visitJavaLiteralDo(GroovySourceAST t)`

Constructor Detail

### PreJava2GroovyConverter

    public PreJava2GroovyConverter(def tokenNames)

Method Detail

### getGrandParentNode

    GroovySourceAST getGrandParentNode()

### getParentNode

    GroovySourceAST getParentNode()

### pop

    public GroovySourceAST pop()

### push

    public void push(GroovySourceAST t)

### swapTwoChildren

    public void swapTwoChildren(GroovySourceAST t)

  To swap two children of node 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.

### visitDefault

    public void visitDefault(GroovySourceAST t, int visit)

### visitJavaArrayInit

    void visitJavaArrayInit(GroovySourceAST t)

### visitJavaLiteralDo

    void visitJavaLiteralDo(GroovySourceAST t)