driver-legacy/src/main/com/mongodb/MongoClient.java
public <T> ListDatabasesIterable<T> listDatabases(final Class<T> clazz) {
        return createListDatabasesIterable(null, clazz);
    }
public <T> ListDatabasesIterable<T> listDatabases(final Class<T> clazz) {
        return createListDatabasesIterable(null, clazz);
    }
public < T > ListDatabasesIterable < T > listDatabases ( final Class < T > clazz ) { return createListDatabasesIterable ( null , clazz ) ; }
Gets the list of databases

@param clazz the class to cast the database documents to
@param <T>   the type of the class to use instead of {@code Document}.
@return the list of databases
@since 3.0
Gets the list of databases