|
Groovy 1.8.4 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectgroovy.inspect.swingui.ScriptToTreeNodeAdapter
class ScriptToTreeNodeAdapter extends Object
This class controls the conversion from a Groovy script as a String into a tree representation of the AST of that script. The script itself will be a tree node, 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 tree node 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 tree node is defined by classname in AstBrowserProperties.properties.
Property Summary | |
---|---|
GroovyClassLoader |
classLoader
|
static Properties |
classNameToStringForm
|
AstBrowserNodeMaker |
nodeMaker
|
boolean |
showScriptClass
|
boolean |
showScriptFreeForm
|
Constructor Summary | |
ScriptToTreeNodeAdapter(def classLoader, def showScriptFreeForm, def showScriptClass, def nodeMaker)
|
Method Summary | |
---|---|
def
|
compile(String script, int compilePhase)
Performs the conversion from script to TreeNode. |
def
|
make(def node)
|
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Property Detail |
---|
final GroovyClassLoader classLoader
static Properties classNameToStringForm
final AstBrowserNodeMaker nodeMaker
boolean showScriptClass
boolean showScriptFreeForm
Constructor Detail |
---|
ScriptToTreeNodeAdapter(def classLoader, def showScriptFreeForm, def showScriptClass, def nodeMaker)
Method Detail |
---|
def compile(String script, int compilePhase)
script
- a Groovy script in String formcompilePhase
- the int based CompilePhase to compile it to.
def make(def node)
Copyright © 2003-2011 The Codehaus. All rights reserved.