|
||||||||||
| 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.BodyBodyIntermediateVisitor
public class BodyBodyIntermediateVisitor
Language Level Visitor for the Intermediate Language Level. Enforces constraints during the first walk of the AST (checking for language specific errors and building the symbol table). This class enforces things that are common to all contexts reachable within a method body or other body (not class or interface body) at the Intermediate Language Level).
| Nested Class Summary | |
|---|---|
static class |
BodyBodyIntermediateVisitor.BodyBodyIntermediateVisitorTest
Test most of the methods declared above right here: |
| 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 | |
|---|---|
BodyBodyIntermediateVisitor(BodyData bodyData,
File file,
String packageName,
String enclosingClassName,
LinkedList<String> importedFiles,
LinkedList<String> importedPackages,
HashSet<String> classesInThisFile,
Hashtable<String,Triple<SourceInfo,LanguageLevelVisitor,SymbolData>> continuations,
LinkedList<Command> fixUps,
HashSet<String> innerClassesInThisBody)
Constructor for BodyBodyElementaryVisitor. |
|
| Method Summary | |
|---|---|
protected VariableData[] |
_variableDeclaration2VariableData(VariableDeclaration vd,
Data enclosingData)
Process a local variable declaration within a method. |
Void |
forBlock(Block that)
Process an instance of Block. |
Void |
forCatchBlock(CatchBlock that)
Visit the block as in forBlock(), but first add the exception parameter as a variable in that lock. |
Void |
forComplexAnonymousClassInstantiation(ComplexAnonymousClassInstantiation that)
Delegate to helper method. |
Void |
forInnerClassDef(InnerClassDef that)
Process a local inner class definition |
Void |
forInnerInterfaceDef(InnerInterfaceDef that)
Process a local inner interface definition |
Void |
forInstanceInitializer(InstanceInitializer that)
Process an instance of InstanceInitializer. |
Void |
forMethodDefDoFirst(MethodDef that)
Give an appropriate error |
Void |
forSimpleAnonymousClassInstantiation(SimpleAnonymousClassInstantiation that)
Delegate to helper method. |
Void |
forThisReferenceDoFirst(ThisReference that)
If this is the body of a constructor, referencing 'this' is illegal. |
Void |
forVariableDeclarationOnly(VariableDeclaration that)
Adds the variables that were declared to the body data and make sure that no two variables have the same name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BodyBodyIntermediateVisitor(BodyData bodyData,
File file,
String packageName,
String enclosingClassName,
LinkedList<String> importedFiles,
LinkedList<String> importedPackages,
HashSet<String> classesInThisFile,
Hashtable<String,Triple<SourceInfo,LanguageLevelVisitor,SymbolData>> continuations,
LinkedList<Command> fixUps,
HashSet<String> innerClassesInThisBody)
bodyData - The BodyData 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 resolvedfixUps - A list of commands to be performed after this pass to fixup the symbolTable| Method Detail |
|---|
public Void forMethodDefDoFirst(MethodDef that)
forMethodDefDoFirst in class JExpressionIFPrunableDepthFirstVisitorpublic Void forInstanceInitializer(InstanceInitializer that)
JExpressionIFVisitor
forInstanceInitializer in interface JExpressionIFVisitor<Void>forInstanceInitializer in class JExpressionIFPrunableDepthFirstVisitorpublic Void forBlock(Block that)
JExpressionIFVisitor
forBlock in interface JExpressionIFVisitor<Void>forBlock in class JExpressionIFPrunableDepthFirstVisitorpublic Void forCatchBlock(CatchBlock that)
forCatchBlock in interface JExpressionIFVisitor<Void>forCatchBlock in class JExpressionIFPrunableDepthFirstVisitorpublic Void forVariableDeclarationOnly(VariableDeclaration that)
forVariableDeclarationOnly in class JExpressionIFPrunableDepthFirstVisitorpublic Void forInnerClassDef(InnerClassDef that)
forInnerClassDef in interface JExpressionIFVisitor<Void>forInnerClassDef in class JExpressionIFPrunableDepthFirstVisitorpublic Void forInnerInterfaceDef(InnerInterfaceDef that)
forInnerInterfaceDef in interface JExpressionIFVisitor<Void>forInnerInterfaceDef in class JExpressionIFPrunableDepthFirstVisitorpublic Void forSimpleAnonymousClassInstantiation(SimpleAnonymousClassInstantiation that)
forSimpleAnonymousClassInstantiation in interface JExpressionIFVisitor<Void>forSimpleAnonymousClassInstantiation in class JExpressionIFPrunableDepthFirstVisitorpublic Void forComplexAnonymousClassInstantiation(ComplexAnonymousClassInstantiation that)
forComplexAnonymousClassInstantiation in interface JExpressionIFVisitor<Void>forComplexAnonymousClassInstantiation in class JExpressionIFPrunableDepthFirstVisitorpublic Void forThisReferenceDoFirst(ThisReference that)
forThisReferenceDoFirst in class JExpressionIFPrunableDepthFirstVisitor
protected VariableData[] _variableDeclaration2VariableData(VariableDeclaration vd,
Data enclosingData)
_variableDeclaration2VariableData in class LanguageLevelVisitorenclosingData - The Data which contains the variables
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||