Groovy 1.7.0

## org.codehaus.groovy.syntax
Class ASTHelper

    java.lang.Object
      org.codehaus.groovy.syntax.ASTHelper

    class ASTHelper
    extends Object

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

Field Summary
`protected ModuleNode` | `output`
`protected static Map` | `resolutions`

Constructor Summary
`ASTHelper(SourceUnit controller, ClassLoader classLoader)`
`ASTHelper()`

Method Summary
`protected void` | `addImport(ClassNode type, String name, String aliasName)`
`protected void` | `addImport(ClassNode type, String name, String aliasName, List annotations)`
`protected void` | `addStarImport(String importPackage)`
`protected void` | `addStarImport(String importPackage, List annotations)`
`protected void` | `addStaticImport(ClassNode type, String name, String alias)`
`protected void` | `addStaticImport(ClassNode type, String name, String alias, List annotations)`
`protected void` | `addStaticStarImport(ClassNode type, String importClass)`
`protected void` | `addStaticStarImport(ClassNode type, String importClass, List annotations)`
`static String` | `dot(String base, String name)`
`protected String` | `dot(String base)` A synonym for `dot( base, "" )`.
`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 annotations)`
`void` | `setPackageName(String packageName)`

Methods inherited from class Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll

Field Detail

### output

    protected ModuleNode output

### resolutions

    protected static Map resolutions

Constructor Detail

### ASTHelper

    public ASTHelper(SourceUnit controller, ClassLoader classLoader)

### ASTHelper

    public ASTHelper()

Method Detail

### addImport

    protected void addImport(ClassNode type, String name, String aliasName)

### addImport

    protected void addImport(ClassNode type, String name, String aliasName, List annotations)

### addStarImport

    protected void addStarImport(String importPackage)

### addStarImport

    protected void addStarImport(String importPackage, List annotations)

### addStaticImport

    protected void addStaticImport(ClassNode type, String name, String alias)

### addStaticImport

    protected void addStaticImport(ClassNode type, String name, String alias, List annotations)

### addStaticStarImport

    protected void addStaticStarImport(ClassNode type, String importClass)

### addStaticStarImport

    protected void addStaticStarImport(ClassNode type, String importClass, List annotations)

### dot

    public static String dot(String base, String name)

  return:
    Two names joined by a dot. If the base name is empty, returns the name unchanged.
  param:
    base typically a package
  param:
    name typically a simple unqualified class name

### dot

    protected 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()

### makeModule

    protected void makeModule()

### setClassLoader

    public void setClassLoader(ClassLoader classLoader)

### setController

    public void setController(SourceUnit controller)

### setPackage

    public PackageNode setPackage(String packageName, List annotations)

### setPackageName

    public void setPackageName(String packageName)

Copyright © 2003-2009 The Codehaus. All rights reserved.