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 enum 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    doStatementsTerminate(List<? extends IStatement> statements)
     
    static void
    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
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • verifyFinalFields

      public static void verifyFinalFields(IGosuClass gsClass)
      Verifies initialization of final fields in the provided class and, recursively, all nested inner classes:
      1. Verifies that a final field is fully initialized either in the declaration or in the constructor[s]
      2. Verifies that an assignment to a final field is mutually exclusive wrt other assignments to the field
      3. 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:
      1. Verifies that a final local var is fully initialized either in the declaration or in the scope of the var
      2. Verifies that an assignment to a final local var is mutually exclusive wrt other assignments to the var
      3. 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)