// FIXME: should catch and re-throw RuntimeExceptions?
databaseMap.put(databaseClass, database);
}
if (database instanceof AbnormalAnalysisResult) {
throw new UncheckedAnalysisException("Error instantiating " + databaseClass.getName() + " database",
((AbnormalAnalysisResult) database).checkedAnalysisException);
}
return databaseClass.cast(database);
}