public class ASTHelper extends Object
A common base class of AST helper methods which can be shared across the classic and new parsers
Modifiers | Name | Description |
---|---|---|
protected ModuleNode |
output |
|
protected static Map |
resolutions |
Constructor and description |
---|
ASTHelper(SourceUnit controller, ClassLoader classLoader) |
ASTHelper() |
Type Params | Return Type | Name 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) |
|
public static String |
dot(String base, String name)
|
|
protected String |
dot(String base) A synonym for dot( base, "" ) . |
|
public ClassLoader |
getClassLoader() Returns our class loader (as supplied on construction). |
|
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<AnnotationNode> annotations) |
|
public void |
setPackageName(String packageName) |
base
- typically a packagename
- typically a simple unqualified class nameReturns our class loader (as supplied on construction).
Copyright © 2003-2024 The Apache Software Foundation. All rights reserved.