databaseMap.put(databaseClass, database);
	public <E> E getDatabase(Class<E> databaseClass) throws CheckedAnalysisException {		Object database = databaseMap.get(databaseClass);				if (database == null) {			try {				// Find the database factory				IDatabaseFactory<?> databaseFactory = databaseFactoryMap.get(databaseClass);				if (databaseFactory == null) {					throw new IllegalArgumentException(							"No database factory registered for " + databaseClass.getName());				}								// Create the database				database = databaseFactory.createDatabase();			} catch (CheckedAnalysisException e) {				// Error - record the analysis error				database = new AnalysisError(e);			}		}				if (database instanceof AnalysisError) {			throw ((AnalysisError)database).exception;		}				// Again, we really should be using Class.cast()		return (E) database;	}