Class VarInitializationVerifier
- java.lang.Object
-
- gw.internal.gosu.parser.statements.VarInitializationVerifier
-
public class VarInitializationVerifier extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VarInitializationVerifier.AssignedState
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
doStatementsTerminate(List<? extends IStatement> statements)
static void
verifyFinalFields(IGosuClass gsClass)
Verifies initialization of final fields in the provided class and, recursively, all nested inner classes: Verifies that a final field is fully initialized either in the declaration or in the constructor[s] Verifies that an assignment to a final field is mutually exclusive wrt other assignments to the field Verifies that a reference to a final field is in a position in the source where the final field is fully initializedstatic void
verifyLocalVars(IGosuClass gsClass, boolean bFinalOnly)
Verifies initialization of local vars in the provided class and, recursively, all nested inner classes: Verifies that a final local var is fully initialized either in the declaration or in the scope of the var Verifies that an assignment to a final local var is mutually exclusive wrt other assignments to the var Verifies that a reference to any local var, not just finals, is in a position in the source where the var is fully initialized
-
-
-
Method Detail
-
verifyFinalFields
public static void verifyFinalFields(IGosuClass gsClass)
Verifies initialization of final fields in the provided class and, recursively, all nested inner classes:- Verifies that a final field is fully initialized either in the declaration or in the constructor[s]
- Verifies that an assignment to a final field is mutually exclusive wrt other assignments to the field
- Verifies that a reference to a final field is in a position in the source where the final field is fully initialized
-
verifyLocalVars
public static void verifyLocalVars(IGosuClass gsClass, boolean bFinalOnly)
Verifies initialization of local vars in the provided class and, recursively, all nested inner classes:- Verifies that a final local var is fully initialized either in the declaration or in the scope of the var
- Verifies that an assignment to a final local var is mutually exclusive wrt other assignments to the var
- Verifies that a reference to any local var, not just finals, is in a position in the source where the var is fully initialized
-
doStatementsTerminate
public static boolean doStatementsTerminate(List<? extends IStatement> statements)
-
-