sugar4j.lang
Class ImportManager

java.lang.Object
  extended by sugar4j.lang.ImportManager

public class ImportManager
extends Object

Manages an import list. At the end of the generation, when all imported types are known, the import list is inserted back into the code.

Call addImport(String, boolean) for each full qualified name to import.

Version:
$Id: ImportManager.java,v 1.7 2008/02/12 00:44:52 krizzdewizz Exp $
Author:
krizzdewizz

Constructor Summary
ImportManager()
           
 
Method Summary
 String addImport(String type, boolean staticc)
          Adds the given type to the import list.
 String getImport(String s)
           
 String getImportList()
          Returns this manager's import list.
 

Constructor Detail

ImportManager

public ImportManager()
Method Detail

addImport

public String addImport(String type,
                        boolean staticc)
Adds the given type to the import list.

Parameters:
type - Full qualified name of the type
staticc - Whether to make a static import
Returns:
If type was not already in the list, returns The local name of the type, else type left unchanged

getImportList

public String getImportList()
Returns this manager's import list.

Returns:
Import list

getImport

public String getImport(String s)