public class TypeNames
extends java.lang.Object
TBD:
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
currentPackage
The package of the class of the current compilation unit.
|
protected java.util.Set |
importOnDemands
Collection of type-imports-on-demand.
|
protected java.util.Map |
imports
Map of single-type-imports.
|
protected TypeSupport |
typeSupport
The corresponding type table.
|
Constructor and Description |
---|
TypeNames(TypeSupport typeSupport)
Creates a new TypeNames instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
declareImport(java.lang.String typeName)
Defines a single-type-import.
|
void |
declareImportOnDemand(java.lang.String packageName)
Defines a type-import-on-demand.
|
void |
init(java.lang.String compilationUnit)
This method initializes the TypeNames table.
|
JavaType |
resolve(java.lang.String name)
Resolves a type name.
|
protected TypeSupport typeSupport
protected java.util.Map imports
protected java.util.Set importOnDemands
protected java.lang.String currentPackage
public TypeNames(TypeSupport typeSupport)
public void init(java.lang.String compilationUnit)
public java.lang.String declareImport(java.lang.String typeName)
typeName
- the fully qualified name of the type to be imported.public void declareImportOnDemand(java.lang.String packageName)
packageName
- the package name to be imported.public JavaType resolve(java.lang.String name)
name
- a type nameCopyright © 2005-2012 Apache Software Foundation. All Rights Reserved.