|
||||||||||
| 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.IntermediateVisitor
edu.rice.cs.javalanglevels.InterfaceBodyIntermediateVisitor
public class InterfaceBodyIntermediateVisitor
Language Level Visitor that represents the Intermediate Language Level. Enforces constraints during the first walk of the AST (checking for langauge specific errors and building the symbol table). This class enforces things that are common to all contexts reachable within an interface body at the Intermediate Language Level.
| Nested Class Summary | |
|---|---|
static class |
InterfaceBodyIntermediateVisitor.InterfaceBodyIntermediateVisitorTest
Test the methods declared in the above class. |
| Nested classes/interfaces inherited from class edu.rice.cs.javalanglevels.IntermediateVisitor |
|---|
IntermediateVisitor.IntermediateVisitorTest |
| 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 | |
|---|---|
InterfaceBodyIntermediateVisitor(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)
Constructor for InterfaceBodyIntermediateVisitor. |
|
| 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 |
forInstanceInitializerDoFirst(InstanceInitializer that)
Throw an appropriate error |
java.lang.Void |
forSimpleAnonymousClassInstantiation(SimpleAnonymousClassInstantiation that)
Delegate to method in LLV |
java.lang.Void |
forStatementDoFirst(Statement that)
|
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 |
forVariableDeclarationDoFirst(VariableDeclaration that)
No fields in interfaces at Intermediate Level. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InterfaceBodyIntermediateVisitor(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| 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 JExpressionIFPrunableDepthFirstVisitorpublic java.lang.Void forVariableDeclarationDoFirst(VariableDeclaration that)
forVariableDeclarationDoFirst in class JExpressionIFPrunableDepthFirstVisitorpublic java.lang.Void forSuperReferenceDoFirst(SuperReference that)
forSuperReferenceDoFirst in class JExpressionIFPrunableDepthFirstVisitorpublic java.lang.Void forThisReferenceDoFirst(ThisReference that)
forThisReferenceDoFirst in class JExpressionIFPrunableDepthFirstVisitorpublic java.lang.Void forAbstractMethodDef(AbstractMethodDef that)
JExpressionIFVisitor
forAbstractMethodDef in interface JExpressionIFVisitor<java.lang.Void>forAbstractMethodDef 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 | |||||||||