コード例 #1
0
ファイル: AnalysisContext.java プロジェクト: deveshg/findbugs
  /**
   * Write an interprocedural property database.
   *
   * @param <DatabaseType> actual type of the database
   * @param <KeyType> type of key (e.g., method or field)
   * @param <Property> type of properties stored in the database
   * @param database the database
   * @param fileName name of database file
   * @param description description of the database
   */
  public <
          DatabaseType extends PropertyDatabase<KeyType, Property>,
          KeyType extends FieldOrMethodDescriptor,
          Property>
      void storePropertyDatabase(DatabaseType database, String fileName, String description) {

    try {
      File dbFile = new File(getDatabaseOutputDir(), fileName);
      if (DEBUG) {
        System.out.println("Writing " + description + " to " + dbFile.getPath() + "...");
      }
      database.writeToFile(dbFile.getPath());
    } catch (IOException e) {
      getLookupFailureCallback().logError("Error writing " + description, e);
    }
  }