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)normalizeFields
public void normalizeFields(TreeVec tvec, Tree tree)normalizeParams
public Tree normalizeParams(Tree tree)normalizeVariableDeclaratorId
public Tree[] normalizeVariableDeclaratorId(Tree type, Tree var)makeClassInfo
public ClassInfo makeClassInfo(Symbol fullName)
ClassInfo
corresponding to a fully
qualified name symbol of a class name.
public ClassInfo makeClassInfoFromClass(Class c)getFileSignatureFromClass
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)makeClassInfoFromFileSignature
public ClassInfo makeClassInfoFromFileSignature(Symbol fullName, Tree sig)treeToClassInfo
public ClassInfo treeToClassInfo(Tree classSig)
ClassInfo
from a
ClassSignatureTree
.
public Hashtable inheritFieldInfo(Type superclassType, Tree classSig)inheritMethodInfo
public Hashtable inheritMethodInfo(Type superclassType, Tree classSig)doesOverride
public boolean doesOverride(MethodInfo m1, MethodInfo m2)inheritInnerClassInfo
public Hashtable inheritInnerClassInfo(Type superclassType, Tree classSig)treeToFieldInfo
public FieldInfo treeToFieldInfo(Tree tree)treeToMethodInfo
public MethodInfo treeToMethodInfo(Tree tree)treeToInnerClassInfo
public ClassInfo treeToInnerClassInfo(Tree tree)treeToType
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