|
||||||||||
| 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.InterfaceBodyFullJavaVisitor
public class InterfaceBodyFullJavaVisitor
Language Level Visitor class that implements the FullJava Language Level. Enforces constraints during the first walk of the AST (checking for langauge specific errors and building the symbol table). This class enforces some constraints imposed on an interface body at the FullJava Language Level.
| Nested Class Summary | |
|---|---|
static class |
InterfaceBodyFullJavaVisitor.InterfaceBodyFullJavaVisitorTest
Test the methods in the above class. |
| 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 | |
|---|---|
InterfaceBodyFullJavaVisitor(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)
Old constructor for InterfaceBodyFullJavaVisitor. |
|
InterfaceBodyFullJavaVisitor(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 InterfaceBodyFullJavaVisitor. |
|
| Method Summary | |
|---|---|
protected VariableData[] |
_variableDeclaration2VariableData(VariableDeclaration vd,
Data enclosingData)
Processes a static field declaration within an interface. |
java.lang.Void |
forAbstractMethodDef(AbstractMethodDef that)
Process an instance of AbstractMethodDef. |
java.lang.Void |
forComplexAnonymousClassInstantiation(ComplexAnonymousClassInstantiation that)
Delegate to method in LLV |
java.lang.Void |
forConcreteMethodDefDoFirst(ConcreteMethodDef that)
Makes sure that this concrete method def is not declared to be abstract. |
java.lang.Void |
forConstructorDefDoFirst(ConstructorDef that)
Throw an error: Interfaces cannot have constructors |
java.lang.Void |
forInnerClassDef(InnerClassDef that)
Call the method in FullJavaVisitor; it's common to this ClassBodyAdvancedVisitor. |
java.lang.Void |
forInnerInterfaceDef(InnerInterfaceDef that)
Call the method in FullJavaVisitor since it's common to this ClassBodyFullJavaVisitor. |
java.lang.Void |
forInstanceInitializerDoFirst(InstanceInitializer that)
Throw an appropriate error |
java.lang.Void |
forSimpleAnonymousClassInstantiation(SimpleAnonymousClassInstantiation that)
Delegate to method in LLV |
java.lang.Void |
forStatementDoFirst(Statement that)
Ignore Statement. |
java.lang.Void |
forSuperReferenceDoFirst(SuperReference that)
No super references for interfaces--give an appropriate error. |
java.lang.Void |
forThisReferenceDoFirst(ThisReference that)
No This literal in interfaces--give an appropriate error |
java.lang.Void |
forVariableDeclarationOnly(VariableDeclaration that)
Ignore VariableDeclaration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InterfaceBodyFullJavaVisitor(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)
sd - The SymbolData that encloses the context we are visiting.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
public InterfaceBodyFullJavaVisitor(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.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 resolvedgenericTypes - A HashMap mapping in scope generic type names to their bounds (SymbolDatas).| Method Detail |
|---|
public java.lang.Void forStatementDoFirst(Statement that)
forStatementDoFirst in class JExpressionIFPrunableDepthFirstVisitorpublic java.lang.Void forConcreteMethodDefDoFirst(ConcreteMethodDef that)
LanguageLevelVisitor
forConcreteMethodDefDoFirst 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 forThisReferenceDoFirst(ThisReference that)
forThisReferenceDoFirst in class JExpressionIFPrunableDepthFirstVisitorpublic java.lang.Void forSuperReferenceDoFirst(SuperReference that)
forSuperReferenceDoFirst in class JExpressionIFPrunableDepthFirstVisitorpublic java.lang.Void forAbstractMethodDef(AbstractMethodDef that)
JExpressionIFVisitor
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 forConstructorDefDoFirst(ConstructorDef that)
forConstructorDefDoFirst in class JExpressionIFPrunableDepthFirstVisitor
protected VariableData[] _variableDeclaration2VariableData(VariableDeclaration vd,
Data enclosingData)
_variableDeclaration2VariableData in class LanguageLevelVisitorenclosingData - The Data immediately enclosing the variablespublic 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 JExpressionIFPrunableDepthFirstVisitor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||