code: private String getWarningLevel(final CommandLineCompilerConfiguration compilerConfig) {
      String warn = null;
      final String[] args = compilerConfig.getPreArguments();
      for (final String arg : args) {
        if ("/W0".equals(arg)) {
          warn = "0";
        }
        if ("/W1".equals(arg)) {
          warn = "1";
        }
        if ("/W2".equals(arg)) {
          warn = "2";
        }
        if ("/W3".equals(arg)) {
          warn = "3";
        }
        // Added by Darren Sargent, 2/26/2008
        if ("/W4".equals(arg)) {
          warn = "4";
        }
        // end added
      }
      return warn;
    }
docs: Get value of WarningLevel property.
  
  @param compilerConfig
  compiler configuration.
  @return value of WarningLevel property.