|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.javalanglevels.JExpressionIFPrunableDepthFirstVisitor
edu.rice.cs.javalanglevels.LanguageLevelVisitor
edu.rice.cs.javalanglevels.FullJavaVisitor
edu.rice.cs.javalanglevels.ClassBodyFullJavaVisitor
public class ClassBodyFullJavaVisitor
Class body walking LanguageLevelVisitor for the FullJava Language Level. Builds the symbol table for a .java file without performing any syntax checking. This file will also be compiled by javac, which will catch the syntax errors.
| Nested Class Summary | |
|---|---|
static class |
ClassBodyFullJavaVisitor.ClassBodyFullJavaVisitorTest
Test the methods that are declared above. |
| Nested classes/interfaces inherited from class edu.rice.cs.javalanglevels.FullJavaVisitor |
|---|
FullJavaVisitor.FullJavaVisitorTest |
| Nested classes/interfaces inherited from class edu.rice.cs.javalanglevels.LanguageLevelVisitor |
|---|
LanguageLevelVisitor.LanguageLevelVisitorTest |
| Field Summary |
|---|
| Fields inherited from class edu.rice.cs.javalanglevels.LanguageLevelVisitor |
|---|
_genericTypes, _log, errors, FINAL_MAV, PACKAGE_MAV, PRIVATE_MAV, PROTECTED_MAV, PUBLIC_MAV, symbolTable |
| Constructor Summary | |
|---|---|
ClassBodyFullJavaVisitor(SymbolData sd,
java.io.File file,
java.lang.String packageName,
java.util.LinkedList<java.lang.String> importedFiles,
java.util.LinkedList<java.lang.String> importedPackages,
java.util.HashSet<java.lang.String> classesInThisFile,
java.util.Hashtable<java.lang.String,Triple<SourceInfo,LanguageLevelVisitor,SymbolData>> continuations,
java.util.LinkedList<Command> fixUps,
java.util.HashMap<java.lang.String,SymbolData> genericTypes)
Preferred constructor for ClassBodyFullJavaVisitor. |
|
ClassBodyFullJavaVisitor(SymbolData sd,
java.lang.String className,
java.io.File file,
java.lang.String packageName,
java.util.LinkedList<java.lang.String> importedFiles,
java.util.LinkedList<java.lang.String> importedPackages,
java.util.HashSet<java.lang.String> classesInThisFile,
java.util.Hashtable<java.lang.String,Triple<SourceInfo,LanguageLevelVisitor,SymbolData>> continuations,
java.util.LinkedList<Command> fixUps)
Deprecated onstructor for ClassBodyFullJavaVisitor. |
|
| Method Summary | |
|---|---|
java.lang.Void |
forAbstractMethodDef(AbstractMethodDef that)
Creates a MethodData corresponding to this method declaration. |
java.lang.Void |
forAbstractMethodDefDoFirst(AbstractMethodDef that)
Ignore AbstractMake sure that this abstract method def is declared to be abstract. |
java.lang.Void |
forComplexAnonymousClassInstantiation(ComplexAnonymousClassInstantiation that)
Delegate to method in LanguageLevelVisitor |
java.lang.Void |
forConcreteMethodDef(ConcreteMethodDef that)
Create a method data corresponding to this method declaration, and then visit the concrete method def with a new bodybody visitor, passing it the enclosing method data. |
java.lang.Void |
forConstructorDef(ConstructorDef that)
Create a constructor corresponding to the specifications in the ConstructorDef, and then visit the constructor body, passing the constructor as the enclosing data. |
java.lang.Void |
forInnerClassDef(InnerClassDef that)
Call the method in FullJavaVisitor since it's common to this and FullJavaBodyFullJavaVisitor. |
java.lang.Void |
forInnerInterfaceDef(InnerInterfaceDef that)
Call the method in FullJavaVisitor since it's common to this and FullJavaBodyFullJavaVisitor. |
java.lang.Void |
forInstanceInitializerDoFirst(InstanceInitializer that)
|
java.lang.Void |
forModifiersAndVisibilityDoFirst(ModifiersAndVisibility that)
Check for problems with modifiers that are specific to method definitions. |
java.lang.Void |
forSimpleAnonymousClassInstantiation(SimpleAnonymousClassInstantiation that)
Delegate to method in LanguageLevelVisitor |
java.lang.Void |
forStatementDoFirst(Statement that)
|
java.lang.Void |
forVariableDeclarationOnly(VariableDeclaration that)
Processes a field declaration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClassBodyFullJavaVisitor(SymbolData sd,
java.lang.String className,
java.io.File file,
java.lang.String packageName,
java.util.LinkedList<java.lang.String> importedFiles,
java.util.LinkedList<java.lang.String> importedPackages,
java.util.HashSet<java.lang.String> classesInThisFile,
java.util.Hashtable<java.lang.String,Triple<SourceInfo,LanguageLevelVisitor,SymbolData>> continuations,
java.util.LinkedList<Command> fixUps)
sd - The SymbolData that encloses the context we are visiting. Must be non-null.className - The name of the enclosing class. Must be non-null and non-empty.file - The source file this came from.packageName - The package the source file is inimportedPackages - A list of package names that were specifically importedclassesInThisFile - A list of the classes that are yet to be defined in this source filecontinuations - A hashtable corresponding to the continuations (unresolved Symbol Datas) that will need to
be resolved
TODO: coalesce className and enclosingClassName
public ClassBodyFullJavaVisitor(SymbolData sd,
java.io.File file,
java.lang.String packageName,
java.util.LinkedList<java.lang.String> importedFiles,
java.util.LinkedList<java.lang.String> importedPackages,
java.util.HashSet<java.lang.String> classesInThisFile,
java.util.Hashtable<java.lang.String,Triple<SourceInfo,LanguageLevelVisitor,SymbolData>> continuations,
java.util.LinkedList<Command> fixUps,
java.util.HashMap<java.lang.String,SymbolData> genericTypes)
sd - The SymbolData that encloses the context we are visiting. Must be non-null.ty.file - The source file this came from.packageName - The package the source file is inimportedPackages - A list of package names that were specifically importedclassesInThisFile - A list of the classes that are yet to be defined in this source filecontinuations - A hashtable corresponding to the continuations (unresolved Symbol Datas) that will need to
be resolved
TODO: coalesce className and enclosingClassName| Method Detail |
|---|
public java.lang.Void forStatementDoFirst(Statement that)
forStatementDoFirst in class JExpressionIFPrunableDepthFirstVisitorpublic java.lang.Void forAbstractMethodDefDoFirst(AbstractMethodDef that)
forAbstractMethodDefDoFirst in class LanguageLevelVisitorpublic java.lang.Void forInstanceInitializerDoFirst(InstanceInitializer that)
forInstanceInitializerDoFirst in class FullJavaVisitorpublic java.lang.Void forVariableDeclarationOnly(VariableDeclaration that)
forVariableDeclarationOnly in class JExpressionIFPrunableDepthFirstVisitorpublic java.lang.Void forConcreteMethodDef(ConcreteMethodDef that)
forConcreteMethodDef in interface JExpressionIFVisitor<java.lang.Void>forConcreteMethodDef in class JExpressionIFPrunableDepthFirstVisitorpublic java.lang.Void forAbstractMethodDef(AbstractMethodDef that)
forAbstractMethodDef in interface JExpressionIFVisitor<java.lang.Void>forAbstractMethodDef in class JExpressionIFPrunableDepthFirstVisitorpublic java.lang.Void forInnerInterfaceDef(InnerInterfaceDef that)
forInnerInterfaceDef in interface JExpressionIFVisitor<java.lang.Void>forInnerInterfaceDef in class JExpressionIFPrunableDepthFirstVisitorpublic java.lang.Void forInnerClassDef(InnerClassDef that)
forInnerClassDef in interface JExpressionIFVisitor<java.lang.Void>forInnerClassDef in class JExpressionIFPrunableDepthFirstVisitorpublic java.lang.Void forConstructorDef(ConstructorDef that)
forConstructorDef in interface JExpressionIFVisitor<java.lang.Void>forConstructorDef in class JExpressionIFPrunableDepthFirstVisitorpublic java.lang.Void forComplexAnonymousClassInstantiation(ComplexAnonymousClassInstantiation that)
forComplexAnonymousClassInstantiation in interface JExpressionIFVisitor<java.lang.Void>forComplexAnonymousClassInstantiation in class JExpressionIFPrunableDepthFirstVisitorpublic java.lang.Void forSimpleAnonymousClassInstantiation(SimpleAnonymousClassInstantiation that)
forSimpleAnonymousClassInstantiation in interface JExpressionIFVisitor<java.lang.Void>forSimpleAnonymousClassInstantiation in class JExpressionIFPrunableDepthFirstVisitorpublic java.lang.Void forModifiersAndVisibilityDoFirst(ModifiersAndVisibility that)
forModifiersAndVisibilityDoFirst in class FullJavaVisitor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||