public class ASTHelper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected ModuleNode |
output |
protected static java.util.Map |
resolutions |
Constructor and Description |
---|
ASTHelper() |
ASTHelper(SourceUnit controller,
java.lang.ClassLoader classLoader) |
Modifier and Type | Method and Description |
---|---|
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<AnnotationNode> annotations) |
protected void |
addStarImport(java.lang.String importPackage) |
protected void |
addStarImport(java.lang.String importPackage,
java.util.List<AnnotationNode> 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<AnnotationNode> annotations) |
protected void |
addStaticStarImport(ClassNode type,
java.lang.String importClass) |
protected void |
addStaticStarImport(ClassNode type,
java.lang.String importClass,
java.util.List<AnnotationNode> annotations) |
protected java.lang.String |
dot(java.lang.String base)
A synonym for
dot( base, "" ) . |
static java.lang.String |
dot(java.lang.String base,
java.lang.String name) |
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<AnnotationNode> annotations) |
void |
setPackageName(java.lang.String packageName) |
protected ModuleNode output
protected static java.util.Map resolutions
public ASTHelper(SourceUnit controller, java.lang.ClassLoader classLoader)
public ASTHelper()
public java.lang.String getPackageName()
public void setPackageName(java.lang.String packageName)
public PackageNode setPackage(java.lang.String packageName, java.util.List<AnnotationNode> annotations)
public java.lang.ClassLoader getClassLoader()
public void setClassLoader(java.lang.ClassLoader classLoader)
public SourceUnit getController()
public void setController(SourceUnit controller)
public static java.lang.String dot(java.lang.String base, java.lang.String name)
base
- typically a packagename
- typically a simple unqualified class nameprotected void makeModule()
protected java.lang.String dot(java.lang.String base)
dot( base, "" )
.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<AnnotationNode> 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<AnnotationNode> annotations)
protected void addStaticStarImport(ClassNode type, java.lang.String importClass)
protected void addStaticStarImport(ClassNode type, java.lang.String importClass, java.util.List<AnnotationNode> annotations)
protected void addStarImport(java.lang.String importPackage)
protected void addStarImport(java.lang.String importPackage, java.util.List<AnnotationNode> annotations)