All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----epp.FileSig
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: ClassSignatureTreeClassSignatureTree: ...
FileSignature
information included in a class
file if any.
ClassInfo
corresponding to a fully
qualified name symbol of a class name.
FilesSignature
from an abstract
syntax tree (self!tree) after the macro expansion pass.
ClassSignatureTree
.
CompilationUnit
of an abstract syntax tree into a
FileSignature
.
TypeDeclaration
into a
TypeDeclarationSignatureTree
.
ClassInfo
from a
ClassSignatureTree
.
FileSignature
into
Type
.
public FileSig()
public Tree makeFileSignature()
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.
public Tree normalizeCompilationUnit(Tree tree)
CompilationUnit
of an abstract syntax tree into a
FileSignature
.
public Tree normalizeTypeDeclaration(Tree tree)
TypeDeclaration
into a
TypeDeclarationSignatureTree
.
public Tree normalizeClass(Tree tree)
ClassSignatureTree
.
This method is called from normalizeTypeDeclaration
.
public Tree normalizeMethod(Tree tree)
public void normalizeFields(TreeVec tvec, Tree tree)
public Tree normalizeParams(Tree tree)
public Tree[] normalizeVariableDeclaratorId(Tree type, Tree var)
public ClassInfo makeClassInfo(Symbol fullName)
ClassInfo
corresponding to a fully
qualified name symbol of a class name.
public ClassInfo makeClassInfoFromClass(Class c)
public Tree getFileSignatureFromClass(Class c)
FileSignature
information included in a class
file if any.
Otherwise, returns null.
This method is not implemented yet, and returns null regardless of conditions.
public ClassInfo classToClassInfo(Class c)
public ClassInfo makeClassInfoFromFileSignature(Symbol fullName, Tree sig)
public ClassInfo treeToClassInfo(Tree classSig)
ClassInfo
from a
ClassSignatureTree
.
public Hashtable inheritFieldInfo(Type superclassType, Tree classSig)
public Hashtable inheritMethodInfo(Type superclassType, Tree classSig)
public boolean doesOverride(MethodInfo m1, MethodInfo m2)
public Hashtable inheritInnerClassInfo(Type superclassType, Tree classSig)
public FieldInfo treeToFieldInfo(Tree tree)
public MethodInfo treeToMethodInfo(Tree tree)
public ClassInfo treeToInnerClassInfo(Tree tree)
public Type treeToType(Tree tree)
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