|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.javalanglevels.tree.JExpressionIFDepthFirstVisitor<TypeData>
edu.rice.cs.javalanglevels.TypeChecker
edu.rice.cs.javalanglevels.SpecialTypeChecker
edu.rice.cs.javalanglevels.ClassBodyTypeChecker
public class ClassBodyTypeChecker
Do the TypeChecking appropriate to the context of a class body. Common to all Language Levels.
| Nested Class Summary | |
|---|---|
static class |
ClassBodyTypeChecker.ClassBodyTypeCheckerTest
Test the methods that are defined above. |
| Nested classes/interfaces inherited from class edu.rice.cs.javalanglevels.SpecialTypeChecker |
|---|
SpecialTypeChecker.BobTest |
| Nested classes/interfaces inherited from class edu.rice.cs.javalanglevels.TypeChecker |
|---|
TypeChecker.TypeCheckerTest |
| Field Summary | |
|---|---|
protected boolean |
hasConstructor
True if we encounter a ConstructorDef while visiting the body. |
| Fields inherited from class edu.rice.cs.javalanglevels.SpecialTypeChecker |
|---|
_data, _thrown, _vars, thingsThatHaveBeenAssigned |
| Fields inherited from class edu.rice.cs.javalanglevels.TypeChecker |
|---|
_abstractMav, _finalMav, _finalPublicMav, _log, _packageMav, _privateMav, _protectedMav, _publicAbstractMav, _publicMav, _publicStaticMav, NONE, NULL_LITERAL |
| Constructor Summary | |
|---|---|
ClassBodyTypeChecker(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.LinkedList<VariableData> vars,
java.util.LinkedList<Pair<SymbolData,JExpression>> thrown)
Constructor for ClassBodyTypeChecker. |
|
| Method Summary | |
|---|---|
protected Data |
_getData()
The top level type checker does not have a data |
TypeData |
forAbstractMethodDef(AbstractMethodDef that)
Process an instance of AbstractMethodDef. |
TypeData |
forConcreteMethodDef(ConcreteMethodDef that)
Visit all of the fields of the ConcreteMethodDef, and resolve everything. |
TypeData |
forConstructorDef(ConstructorDef that)
Finds the corresponding MethodData for this constructor first. |
TypeData |
forConstructorDefOnly(ConstructorDef that,
TypeData mavRes,
TypeData[] parameters_result,
TypeData[] throwsRes,
TypeData bodyRes)
|
TypeData |
forTypeOnly(Type that)
|
TypeData |
forUninitializedVariableDeclaratorOnly(UninitializedVariableDeclarator that,
TypeData typeRes,
TypeData nameRes)
We need to do this so that expressions (which should only occur in variable initializers and initializer blocks) can know which fields have already been declared |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean hasConstructor
| Constructor Detail |
|---|
public ClassBodyTypeChecker(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.LinkedList<VariableData> vars,
java.util.LinkedList<Pair<SymbolData,JExpression>> thrown)
sd - The SymbolData of the class we are type checking.file - The File corresponding to the source file we are checking.packageName - The package of the source file.importedFiles - A list of the names of the classes that are specifically imported in the source fileimportedPackages - A list of the names of the packages that are imported in the source file.vars - A list of the variable datas that can be seen and have been given a value before this contextthrown - The exceptions that are thrown| Method Detail |
|---|
protected Data _getData()
TypeChecker
_getData in class SpecialTypeChecker
public TypeData forUninitializedVariableDeclaratorOnly(UninitializedVariableDeclarator that,
TypeData typeRes,
TypeData nameRes)
forUninitializedVariableDeclaratorOnly in class JExpressionIFDepthFirstVisitor<TypeData>public TypeData forConstructorDef(ConstructorDef that)
forConstructorDef in interface JExpressionIFVisitor<TypeData>forConstructorDef in class JExpressionIFDepthFirstVisitor<TypeData>
public TypeData forConstructorDefOnly(ConstructorDef that,
TypeData mavRes,
TypeData[] parameters_result,
TypeData[] throwsRes,
TypeData bodyRes)
public TypeData forConcreteMethodDef(ConcreteMethodDef that)
forConcreteMethodDef in interface JExpressionIFVisitor<TypeData>forConcreteMethodDef in class JExpressionIFDepthFirstVisitor<TypeData>public TypeData forAbstractMethodDef(AbstractMethodDef that)
JExpressionIFVisitor
forAbstractMethodDef in interface JExpressionIFVisitor<TypeData>forAbstractMethodDef in class JExpressionIFDepthFirstVisitor<TypeData>public TypeData forTypeOnly(Type that)
forTypeOnly in class JExpressionIFDepthFirstVisitor<TypeData>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||