|
Groovy 2.2.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.syntax.ASTHelper
public class ASTHelper extends Object
A common base class of AST helper methods which can be shared across the classic and new parsers
Field Summary | |
---|---|
protected ModuleNode |
output
|
protected static Map |
resolutions
|
Constructor Summary | |
ASTHelper(SourceUnit controller, ClassLoader classLoader)
|
|
ASTHelper()
|
Method Summary | |
---|---|
protected void
|
addImport(ClassNode type, String name, String aliasName)
|
protected void
|
addImport(ClassNode type, String name, String aliasName, List annotations)
|
protected void
|
addStarImport(String importPackage)
|
protected void
|
addStarImport(String importPackage, List annotations)
|
protected void
|
addStaticImport(ClassNode type, String name, String alias)
|
protected void
|
addStaticImport(ClassNode type, String name, String alias, List annotations)
|
protected void
|
addStaticStarImport(ClassNode type, String importClass)
|
protected void
|
addStaticStarImport(ClassNode type, String importClass, List annotations)
|
static String
|
dot(String base, String name)
|
protected String
|
dot(String base)
A synonym for |
ClassLoader
|
getClassLoader()
Returns our class loader (as supplied on construction). |
SourceUnit
|
getController()
|
String
|
getPackageName()
|
protected void
|
makeModule()
|
void
|
setClassLoader(ClassLoader classLoader)
|
void
|
setController(SourceUnit controller)
|
PackageNode
|
setPackage(String packageName, List annotations)
|
void
|
setPackageName(String packageName)
|
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Field Detail |
---|
protected ModuleNode output
protected static Map resolutions
Constructor Detail |
---|
public ASTHelper(SourceUnit controller, ClassLoader classLoader)
public ASTHelper()
Method Detail |
---|
protected void addImport(ClassNode type, String name, String aliasName)
protected void addImport(ClassNode type, String name, String aliasName, List annotations)
protected void addStarImport(String importPackage)
protected void addStarImport(String importPackage, List annotations)
protected void addStaticImport(ClassNode type, String name, String alias)
protected void addStaticImport(ClassNode type, String name, String alias, List annotations)
protected void addStaticStarImport(ClassNode type, String importClass)
protected void addStaticStarImport(ClassNode type, String importClass, List annotations)
public static String dot(String base, String name)
base
- typically a packagename
- typically a simple unqualified class name
protected String dot(String base)
dot( base, "" )
.
public ClassLoader getClassLoader()
public SourceUnit getController()
public String getPackageName()
protected void makeModule()
public void setClassLoader(ClassLoader classLoader)
public void setController(SourceUnit controller)
public PackageNode setPackage(String packageName, List annotations)
public void setPackageName(String packageName)
Copyright © 2003-2013 The Codehaus. All rights reserved.