Overview | Package | Class
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.groovy.syntax
Class ASTHelper

A common base class of AST helper methods which can be shared across the classic and new parsers

author:
  Jochen Theodorou

author:
  James Strachan

author:
  Bob McWhirter

author:
  Sam Pullara

author:
  Chris Poirier

version:
  $Revision: 8008 $

Field Summary
`ClassLoader` | `classLoader`
`SourceUnit` | `controller`
`Map` | `imports`
`List` | `newClasses`
`ModuleNode` | `output`
`String` | `packageName`
`Map` | `resolutions`
`List` | `staticDotImports`
`Map` | `staticImports`

Constructor Summary
`ASTHelper(SourceUnit controller, ClassLoader classLoader)` The SourceUnit controlling us
`ASTHelper()`

Method Summary
`void` | `addNewClassName(String name)`
`static String` | `dot(String base, String name)` Returns two names joined by a dot.
`String` | `dot(String base)` A synonym for `dot( base, "" )`.
`ClassLoader` | `getClassLoader()` Returns our class loader (as supplied on construction).
`SourceUnit` | `getController()`
`String` | `getPackageName()`
`void` | `importClass(ClassNode type, String name, String as)`
`void` | `importPackageWithStar(String importPackage)`
`void` | `makeModule()`
`void` | `setClassLoader(ClassLoader classLoader)`
`void` | `setController(SourceUnit controller)`
`void` | `setPackageName(String packageName)`
`void` | `staticImportClassWithStar(ClassNode type, String importClass)`
`void` | `staticImportMethodOrField(ClassNode type, String name, String alias)`

Constructor Detail

### ASTHelper

    public ASTHelper(SourceUnit controller, ClassLoader classLoader)

  The SourceUnit controlling us

### ASTHelper

    public ASTHelper()

Method Detail

### addNewClassName

    void addNewClassName(String name)

### dot

    public static String dot(String base, String name)

  Returns two names joined by a dot. If the base name is empty, returns the name unchanged.

### dot

    String dot(String base)

  A synonym for `dot( base, "" )`.

### getClassLoader

    public ClassLoader getClassLoader()

  Returns our class loader (as supplied on construction).

### getController

    public SourceUnit getController()

### getPackageName

    public String getPackageName()

### importClass

    void importClass(ClassNode type, String name, String as)

### importPackageWithStar

    void importPackageWithStar(String importPackage)

### makeModule

    void makeModule()

### setClassLoader

    public void setClassLoader(ClassLoader classLoader)

### setController

    public void setController(SourceUnit controller)

### setPackageName

    public void setPackageName(String packageName)

### staticImportClassWithStar

    void staticImportClassWithStar(ClassNode type, String importClass)

### staticImportMethodOrField

    void staticImportMethodOrField(ClassNode type, String name, String alias)