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