|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.syntax.ASTHelper
public class ASTHelper extends java.lang.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 java.util.Map |
resolutions
|
Constructor Summary | |
ASTHelper(SourceUnit controller, java.lang.ClassLoader classLoader)
|
|
ASTHelper()
|
Method Summary | |
---|---|
protected void
|
addImport(ClassNode type, java.lang.String name, java.lang.String aliasName)
|
protected void
|
addImport(ClassNode type, java.lang.String name, java.lang.String aliasName, java.util.List annotations)
|
protected void
|
addStarImport(java.lang.String importPackage)
|
protected void
|
addStarImport(java.lang.String importPackage, java.util.List annotations)
|
protected void
|
addStaticImport(ClassNode type, java.lang.String name, java.lang.String alias)
|
protected void
|
addStaticImport(ClassNode type, java.lang.String name, java.lang.String alias, java.util.List annotations)
|
protected void
|
addStaticStarImport(ClassNode type, java.lang.String importClass)
|
protected void
|
addStaticStarImport(ClassNode type, java.lang.String importClass, java.util.List annotations)
|
static java.lang.String
|
dot(java.lang.String base, java.lang.String name)
|
protected java.lang.String
|
dot(java.lang.String base)
A synonym for |
java.lang.ClassLoader
|
getClassLoader()
Returns our class loader (as supplied on construction). |
SourceUnit
|
getController()
|
java.lang.String
|
getPackageName()
|
protected void
|
makeModule()
|
void
|
setClassLoader(java.lang.ClassLoader classLoader)
|
void
|
setController(SourceUnit controller)
|
PackageNode
|
setPackage(java.lang.String packageName, java.util.List annotations)
|
void
|
setPackageName(java.lang.String packageName)
|
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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() |
Field Detail |
---|
protected ModuleNode output
protected static java.util.Map resolutions
Constructor Detail |
---|
public ASTHelper(SourceUnit controller, java.lang.ClassLoader classLoader)
public ASTHelper()
Method Detail |
---|
protected void addImport(ClassNode type, java.lang.String name, java.lang.String aliasName)
protected void addImport(ClassNode type, java.lang.String name, java.lang.String aliasName, java.util.List annotations)
protected void addStarImport(java.lang.String importPackage)
protected void addStarImport(java.lang.String importPackage, java.util.List annotations)
protected void addStaticImport(ClassNode type, java.lang.String name, java.lang.String alias)
protected void addStaticImport(ClassNode type, java.lang.String name, java.lang.String alias, java.util.List annotations)
protected void addStaticStarImport(ClassNode type, java.lang.String importClass)
protected void addStaticStarImport(ClassNode type, java.lang.String importClass, java.util.List annotations)
public static java.lang.String dot(java.lang.String base, java.lang.String name)
base
- typically a packagename
- typically a simple unqualified class name
protected java.lang.String dot(java.lang.String base)
dot( base, "" )
.
public java.lang.ClassLoader getClassLoader()
public SourceUnit getController()
public java.lang.String getPackageName()
protected void makeModule()
public void setClassLoader(java.lang.ClassLoader classLoader)
public void setController(SourceUnit controller)
public PackageNode setPackage(java.lang.String packageName, java.util.List annotations)
public void setPackageName(java.lang.String packageName)
Groovy Documentation