|
||||||||||
| 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.Bob
edu.rice.cs.javalanglevels.BodyTypeChecker
edu.rice.cs.javalanglevels.ConstructorBodyTypeChecker
public class ConstructorBodyTypeChecker
Do the TypeChecking appropriate to the context of a constructor body. Common to all Language Levels.
| Nested Class Summary | |
|---|---|
static class |
ConstructorBodyTypeChecker.ConstructorBodyTypeCheckerTest
Test the methods in the above class. |
| Nested classes/interfaces inherited from class edu.rice.cs.javalanglevels.BodyTypeChecker |
|---|
BodyTypeChecker.BodyTypeCheckerTest |
| Nested classes/interfaces inherited from class edu.rice.cs.javalanglevels.Bob |
|---|
Bob.BobTest |
| Nested classes/interfaces inherited from class edu.rice.cs.javalanglevels.TypeChecker |
|---|
TypeChecker.TypeCheckerTest |
| Field Summary |
|---|
| Fields inherited from class edu.rice.cs.javalanglevels.BodyTypeChecker |
|---|
_bodyData |
| Fields inherited from class edu.rice.cs.javalanglevels.Bob |
|---|
_data, _thrown, _vars, thingsThatHaveBeenAssigned |
| Fields inherited from class edu.rice.cs.javalanglevels.TypeChecker |
|---|
_log |
| Constructor Summary | |
|---|---|
ConstructorBodyTypeChecker(BodyData bodyData,
File file,
String packageName,
LinkedList<String> importedFiles,
LinkedList<String> importedPackages,
LinkedList<VariableData> vars,
LinkedList<Pair<SymbolData,JExpression>> thrown)
|
|
| Method Summary | |
|---|---|
TypeData |
complexSuperConstructorInvocationAllowed(ComplexSuperConstructorInvocation that)
This is used in the case where a complex super constructor invocation is allowed i.e. |
TypeData |
complexThisConstructorInvocationNotAllowed(ComplexThisConstructorInvocation that)
ComplexThisConstructorInvocations are not ever allowed--throw an appropriate error. |
protected BodyTypeChecker |
createANewInstanceOfMe(BodyData bodyData,
File file,
String pakage,
LinkedList<String> importedFiles,
LinkedList<String> importedPackages,
LinkedList<VariableData> vars,
LinkedList<Pair<SymbolData,JExpression>> thrown)
Create a new instance of this class for visiting inner bodies. |
TypeData |
forBracedBody(BracedBody that)
Walk over the statements in the BracedBody, but treat the first line specially. |
TypeData |
forValueReturnStatementOnly(ValueReturnStatement that,
TypeData value_result)
Throw an error and return null, becuase constructors cannot have value return statements in their bodies. |
TypeData |
forVoidReturnStatementOnly(VoidReturnStatement that)
Void return statements are allowed in constructor bodies, since according to java, constructors are void return methods. |
TypeData |
simpleSuperConstructorInvocationAllowed(SimpleSuperConstructorInvocation that)
This is used in the case where a simple super constructor invocation is allowed i.e. |
TypeData |
simpleThisConstructorInvocationAllowed(SimpleThisConstructorInvocation that)
This is used in the case where a simple this constructor invocation is allowed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConstructorBodyTypeChecker(BodyData bodyData,
File file,
String packageName,
LinkedList<String> importedFiles,
LinkedList<String> importedPackages,
LinkedList<VariableData> vars,
LinkedList<Pair<SymbolData,JExpression>> thrown)
| Method Detail |
|---|
protected BodyTypeChecker createANewInstanceOfMe(BodyData bodyData,
File file,
String pakage,
LinkedList<String> importedFiles,
LinkedList<String> importedPackages,
LinkedList<VariableData> vars,
LinkedList<Pair<SymbolData,JExpression>> thrown)
createANewInstanceOfMe in class BodyTypeCheckerpublic TypeData simpleThisConstructorInvocationAllowed(SimpleThisConstructorInvocation that)
public TypeData complexThisConstructorInvocationNotAllowed(ComplexThisConstructorInvocation that)
public TypeData simpleSuperConstructorInvocationAllowed(SimpleSuperConstructorInvocation that)
public TypeData complexSuperConstructorInvocationAllowed(ComplexSuperConstructorInvocation that)
public TypeData forVoidReturnStatementOnly(VoidReturnStatement that)
forVoidReturnStatementOnly in class BodyTypeChecker
public TypeData forValueReturnStatementOnly(ValueReturnStatement that,
TypeData value_result)
forValueReturnStatementOnly in class BodyTypeCheckerpublic TypeData forBracedBody(BracedBody that)
forBracedBody in interface JExpressionIFVisitor<TypeData>forBracedBody in class Bob
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||