mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Replace nested @Multibindings interfaces with the new @Multibinds feature. See []
If the enclosing module can be abstract, pull @Multibinds methods up into it; otherwise, replace the @Multibindings interface with a @Module and include it into the enclosing module. Tested: TAP --sample for global presubmit queue [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=125589112
This commit is contained in:
parent
e87987072b
commit
86af4c2f6a
2 changed files with 14 additions and 14 deletions
|
@ -23,9 +23,9 @@ import com.google.api.services.bigquery.model.TableFieldSchema;
|
|||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import dagger.Module;
|
||||
import dagger.Multibindings;
|
||||
import dagger.Provides;
|
||||
import dagger.multibindings.ElementsIntoSet;
|
||||
import dagger.multibindings.Multibinds;
|
||||
|
||||
import google.registry.config.ConfigModule.Config;
|
||||
import google.registry.request.OAuthScopes;
|
||||
|
@ -43,14 +43,11 @@ import java.util.Set;
|
|||
* @see google.registry.request.Modules.UseAppIdentityCredentialForGoogleApisModule
|
||||
*/
|
||||
@Module
|
||||
public final class BigqueryModule {
|
||||
public abstract class BigqueryModule {
|
||||
|
||||
@Multibindings
|
||||
interface BigQueryMultibindings {
|
||||
|
||||
/** Provides a map of BigQuery table names to field names. */
|
||||
Map<String, ImmutableList<TableFieldSchema>> bigquerySchemas();
|
||||
}
|
||||
/** Provides a map of BigQuery table names to field names. */
|
||||
@Multibinds
|
||||
abstract Map<String, ImmutableList<TableFieldSchema>> bigquerySchemas();
|
||||
|
||||
/** Provides OAuth2 scopes for the Bigquery service needed by Domain Registry. */
|
||||
@Provides
|
||||
|
@ -70,4 +67,7 @@ public final class BigqueryModule {
|
|||
.setApplicationName(projectId)
|
||||
.build();
|
||||
}
|
||||
|
||||
// No subclasses.
|
||||
private BigqueryModule() {}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue