Package org.codehaus.groovy.syntax
Class ASTHelper
java.lang.Object
org.codehaus.groovy.syntax.ASTHelper
A common base class of AST helper methods which can be shared across the classic and new parsers
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
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
A synonym fordot( base, "" )
.static String
Returns our class loader (as supplied on construction).protected void
void
setClassLoader
(ClassLoader classLoader) void
setController
(SourceUnit controller) setPackage
(String packageName, List<AnnotationNode> annotations) void
setPackageName
(String packageName)
-
Field Details
-
output
-
resolutions
-
-
Constructor Details
-
ASTHelper
-
ASTHelper
public ASTHelper()
-
-
Method Details
-
getPackageName
-
setPackageName
-
setPackage
-
getClassLoader
Returns our class loader (as supplied on construction). -
setClassLoader
-
getController
-
setController
-
dot
- Parameters:
base
- typically a packagename
- typically a simple unqualified class name- Returns:
- Two names joined by a dot. If the base name is empty, returns the name unchanged.
-
makeModule
protected void makeModule() -
dot
A synonym fordot( base, "" )
. -
addImport
-
addImport
protected void addImport(ClassNode type, String name, String aliasName, List<AnnotationNode> annotations) -
addStaticImport
-
addStaticImport
protected void addStaticImport(ClassNode type, String name, String alias, List<AnnotationNode> annotations) -
addStaticStarImport
-
addStaticStarImport
protected void addStaticStarImport(ClassNode type, String importClass, List<AnnotationNode> annotations) -
addStarImport
-
addStarImport
-