All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class epp.TypeNameTable

java.lang.Object
   |
   +----epp.TypeNameTable

public class TypeNameTable
extends Object
The TypeNameTable class converts a "type name" into a fully qualified name.

This class handles "type names" that are Trees in the form of "(name ...)". Types with structures, such as array types are not handled.

The conversion is conducted under the following rules.

The instance of this table is stored in the dynamic variable :typeNameTable. However, you cannot use this table until you get into Phase2. (According to the Java language specification, conversion to a fully qualified name in Phase1 is impossible. This is because, the conversion is affected by what classes exist in the current package.

The conversion to fully qualified names is done by referencing the package declarations and import declarations of the processed files, classes defined in all the source files, and class names that can be accessed through CLASSPATH.


Constructor Index

 o TypeNameTable(Tree)
Receives a tree of CompilationUnit as an argument and creates and returns a TypeNameTable.

Method Index

 o doesClassExist(Tree)
Returns true if the class expressed by the fully qualified name actually exists and is accesible, and otherwise returns false.
 o isSamePackage(Tree)
Returns true if the package currently processed and the package that the fullName belongs match, and otherwise returns false.
 o nameToFullName(Tree)
Converts a type name of a Tree into a Tree that expresses a fully qualified name.
 o nameToFullNameSymbol(Tree)
Converts a type name of a Tree into a Symbol.

Constructors

 o TypeNameTable
 public TypeNameTable(Tree tree)
Receives a tree of CompilationUnit as an argument and creates and returns a TypeNameTable.

Methods

 o nameToFullNameSymbol
 public Symbol nameToFullNameSymbol(Tree tree)
Converts a type name of a Tree into a Symbol.

 o nameToFullName
 public Tree nameToFullName(Tree tree)
Converts a type name of a Tree into a Tree that expresses a fully qualified name.

 o doesClassExist
 public boolean doesClassExist(Tree fullName)
Returns true if the class expressed by the fully qualified name actually exists and is accesible, and otherwise returns false. This method is called from nameToFullName and Type#resolveAmbiguousName.

See Also:
nameToFullName, resolveAmbiguousName
 o isSamePackage
 public boolean isSamePackage(Tree fullName)
Returns true if the package currently processed and the package that the fullName belongs match, and otherwise returns false.


All Packages  Class Hierarchy  This Package  Previous  Next  Index