All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class epp.FileSig

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

public class FileSig
extends Object
The FileSig.java file defines methods of the EPP preprocessor that primarily relate to FileSignature.

Note: This class is provided for the sake of creating javadocs. It does not exist in the actual EPP source code.

FileSignature is a data structure required to support seperate compilation. A file in EPP goes through phase1 and phase2. Phase1 consists of the parsing pass and macro expansion pass. Phase1 will proceed without depending on any other files. When phase1 completes, the FileSignature of the target file is established and saved into that file. Phase2 consists of the type checking pass and code emitting pass. Phase2 proceeds with type checking while referencing the FileSignature of other files as required, and expands macros using type information.

If a plug-in should introduce customized type definition statements that will be referenced from other files, you will need to extend some of the methods explained below.

FileSignature is a Tree with the following structure. (The structure is different from the abstract syntax tree of the program.)

FileSignature:
	(fileSignature 
		(packageDeclaration PackageName) 
		(imports ImportDeclaration*)
		(typeDeclarationSignatures TypeDeclarationSignature*))
TypeDeclarationSignature:
	(typeDeclarationSignature Name TypeDeclarationSignatureTree)
TypeDeclarationSignatureTree:
	ClassSignatureTree
	
ClassSignatureTree:
	...

See Also:
FileSignatreTable, Type

Constructor Index

 o FileSig()

Method Index

 o classToClassInfo(Class)
 o doesOverride(MethodInfo, MethodInfo)
 o getFileSignatureFromClass(Class)
Returns encoded FileSignature information included in a class file if any.
 o inheritFieldInfo(Type, Tree)
 o inheritInnerClassInfo(Type, Tree)
 o inheritMethodInfo(Type, Tree)
 o makeClassInfo(Symbol)
Creates and returns a ClassInfo corresponding to a fully qualified name symbol of a class name.
 o makeClassInfoFromClass(Class)
 o makeClassInfoFromFileSignature(Symbol, Tree)
 o makeFileSignature()
Creates and returns a FilesSignature from an abstract syntax tree (self!tree) after the macro expansion pass.
 o normalizeClass(Tree)
Converts an abstract syntax tree of a class or interface into a ClassSignatureTree.
 o normalizeCompilationUnit(Tree)
Converts a CompilationUnit of an abstract syntax tree into a FileSignature.
 o normalizeFields(TreeVec, Tree)
 o normalizeMethod(Tree)
 o normalizeParams(Tree)
 o normalizeTypeDeclaration(Tree)
Converts an abstract syntax tree of TypeDeclaration into a TypeDeclarationSignatureTree.
 o normalizeVariableDeclaratorId(Tree, Tree)
 o treeToClassInfo(Tree)
Creates and returns a ClassInfo from a ClassSignatureTree.
 o treeToFieldInfo(Tree)
 o treeToInnerClassInfo(Tree)
 o treeToMethodInfo(Tree)
 o treeToType(Tree)
Converts type names that appear in FileSignature into Type.

Constructors

 o FileSig
 public FileSig()

Methods

 o makeFileSignature
 public Tree makeFileSignature()
Creates and returns a FilesSignature from an abstract syntax tree (self!tree) after the macro expansion pass. This method is called from the EPP main routine at the end of phase1.

See Also:
Epp
 o normalizeCompilationUnit
 public Tree normalizeCompilationUnit(Tree tree)
Converts a CompilationUnit of an abstract syntax tree into a FileSignature.

 o normalizeTypeDeclaration
 public Tree normalizeTypeDeclaration(Tree tree)
Converts an abstract syntax tree of TypeDeclaration into a TypeDeclarationSignatureTree.

 o normalizeClass
 public Tree normalizeClass(Tree tree)
Converts an abstract syntax tree of a class or interface into a ClassSignatureTree. This method is called from normalizeTypeDeclaration.

See Also:
normalizeTypeDeclaration
 o normalizeMethod
 public Tree normalizeMethod(Tree tree)
 o normalizeFields
 public void normalizeFields(TreeVec tvec,
                             Tree tree)
 o normalizeParams
 public Tree normalizeParams(Tree tree)
 o normalizeVariableDeclaratorId
 public Tree[] normalizeVariableDeclaratorId(Tree type,
                                             Tree var)
 o makeClassInfo
 public ClassInfo makeClassInfo(Symbol fullName)
Creates and returns a ClassInfo corresponding to a fully qualified name symbol of a class name.

 o makeClassInfoFromClass
 public ClassInfo makeClassInfoFromClass(Class c)
 o getFileSignatureFromClass
 public Tree getFileSignatureFromClass(Class c)
Returns encoded FileSignature information included in a class file if any. Otherwise, returns null.

This method is not implemented yet, and returns null regardless of conditions.

 o classToClassInfo
 public ClassInfo classToClassInfo(Class c)
 o makeClassInfoFromFileSignature
 public ClassInfo makeClassInfoFromFileSignature(Symbol fullName,
                                                 Tree sig)
 o treeToClassInfo
 public ClassInfo treeToClassInfo(Tree classSig)
Creates and returns a ClassInfo from a ClassSignatureTree.

 o inheritFieldInfo
 public Hashtable inheritFieldInfo(Type superclassType,
                                   Tree classSig)
 o inheritMethodInfo
 public Hashtable inheritMethodInfo(Type superclassType,
                                    Tree classSig)
 o doesOverride
 public boolean doesOverride(MethodInfo m1,
                             MethodInfo m2)
 o inheritInnerClassInfo
 public Hashtable inheritInnerClassInfo(Type superclassType,
                                        Tree classSig)
 o treeToFieldInfo
 public FieldInfo treeToFieldInfo(Tree tree)
 o treeToMethodInfo
 public MethodInfo treeToMethodInfo(Tree tree)
 o treeToInnerClassInfo
 public ClassInfo treeToInnerClassInfo(Tree tree)
 o treeToType
 public Type treeToType(Tree tree)
Converts type names that appear in FileSignature into Type. This methods is called from methods such as treeToClassInfo. Do not call this method from TypeChecker.


All Packages  Class Hierarchy  This Package  Previous  Next  Index