Groovy 1.7.10

## groovy.inspect.swingui
[Groovy] Class ScriptToTreeNodeAdapter

    java.lang.Object
      groovy.inspect.swingui.ScriptToTreeNodeAdapter

    class ScriptToTreeNodeAdapter
    extends Object

This class controls the conversion from a Groovy script as a String into a Swing JTree representation of the AST in that script. The script itself will be a TreeNode, and each class in the script will be a tree node. The conversion creates tree nodes for any concrete class found within an AST visitor. So, if a TreeNode should be shown once for each ASTNode and the parent types will not appear as nodes. Custom subclasses of expression types will not appear in the tree. The String label of a TreeNode is defined by classname in AstBrowserProperties.properties.

Authors:
  Hamlet D'Arcy

Property Summary
`GroovyClassLoader` | `classLoader`
`static Properties` | `classNameToStringForm`
`boolean` | `showScriptClass`
`boolean` | `showScriptFreeForm`

Constructor Summary
`ScriptToTreeNodeAdapter(def classLoader, def showScriptFreeForm, def showScriptClass)`

Method Summary
`TreeNode` | `compile(String script, int compilePhase)` Performs the conversion from script to TreeNode.
`TreeNode` | `make(def node)`

Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Property Detail

### classLoader

    final GroovyClassLoader classLoader

### classNameToStringForm

    static Properties classNameToStringForm

### showScriptClass

    boolean showScriptClass

### showScriptFreeForm

    boolean showScriptFreeForm

Constructor Detail

### ScriptToTreeNodeAdapter

    ScriptToTreeNodeAdapter(def classLoader, def showScriptFreeForm, def showScriptClass)

Method Detail

### compile

    TreeNode compile(String script, int compilePhase)

  Performs the conversion from script to TreeNode.
  Parameters:
    `script` - a Groovy script in String form
    `compilePhase` - the int based CompilePhase to compile it to.

### make

    TreeNode make(def node)

Copyright © 2003-2010 The Codehaus. All rights reserved.