title: @Component.Builder is missing setters for required modules or components [Dagger2]
body: <p>I'm trying to use <strong>Component.Builder</strong> to inject my module but something is wrong with <strong>RestModule</strong> -one of my modules.
  it returns </p>
  
  <blockquote>
    <p>Error:(41, 5) error: @Component.Builder is missing setters for
    required modules or components:
    [com.injection.module.services.RestModule]</p>
  </blockquote>
  
  <p>Here's the <strong>ApplicationComponent</strong>:</p>
  
  <pre><code>@Singleton
  @Component(modules = {PresenterEnvironmentModule.class,
      RestModule.class})
  public interface PresenterEnvironmentComponent {
  
  
  @Component.Builder
  interface Builder {
  
      @BindsInstance
      Builder sharedPreferenceService(SharedPrefService sharedPreferences);
  
      @BindsInstance
      Builder loggingService(LoggingService loggingService);
  
      @BindsInstance
      Builder applicationService(Application application);
  
      @BindsInstance
      Builder connectivityService(ConnectivityService connectivityService);
  
      @BindsInstance
      Builder schedulersService(SchedulersService schedulersService);
  
      @BindsInstance
      Builder sessionService(SessionService sessionService);
  
  
  
      PresenterEnvironmentComponent build();
  
  }
  
  @NonNull
  PresenterEnvironment presenterEnvironment();
  
  void inject(BaseBootstrapActivity&lt;BaseBootstrapPresenter&gt; baseBootstrapActivity);
  }
  </code></pre>
  
  <p>And Here's The RestModule:</p>
  
  <pre><code> @Module
   public class RestModule {
   private final boolean debuggable;
   private final String baseUrl;
   @NonNull
   private final TokenInterceptor tokenInterceptor;
   @NonNull
   private final BootstrapRestService bootstrapRestService;
   @Nullable
   private Interceptor[] additionalInterceptors;
   @Nullable
   private Function&lt;OkHttpClient.Builder, OkHttpClient.Builder&gt; onOkHttpClient;
  @Nullable
  private Function&lt;OkHttpClient.Builder, OkHttpClient.Builder&gt; onOkHttpClientForUploading;
  
  public RestModule(@NonNull RestSettings restSettings) {
      this.debuggable = restSettings.isDebuggable();
      this.baseUrl =  restSettings.getBaseUrl();
      this.tokenInterceptor =   restSettings.getTokenInterceptor();
      this.bootstrapRestService = restSettings.getRestService();
      this.onOkHttpClient = restSettings.getOnOkHttpClient();
      this.onOkHttpClientForUploading = restSettings.getOnOkHttpClientForUploading();
      this.additionalInterceptors =     restSettings.getAdditionalInterceptors();
  }
  
  @Provides
  @Singleton
  @NonNull
  @Type.Basic
  public OkHttpClient provideOkHttpClient(@NonNull TokenInterceptor tokenInterceptor,
                                          @NonNull HttpLoggingInterceptor loggingInterceptor,
                                          @NonNull OkLogInterceptor okLogInterceptor,
                                          @NonNull CachingInterceptor cacheInterceptor) {
      OkHttpClient.Builder builder = new OkHttpClient.Builder();
      builder.addInterceptor(tokenInterceptor);
      if (additionalInterceptors != null &amp;&amp; additionalInterceptors.length &gt; 0) {
          for (Interceptor interceptor : additionalInterceptors) {
              builder.addInterceptor(interceptor);
          }
      }
      if (onOkHttpClient != null) {
          builder = apply(onOkHttpClient, builder);
      }
      if (debuggable) {
          // Add HttpLoggingInterceptor
          builder.addInterceptor(loggingInterceptor);
          // add cache interceptor
          builder.addNetworkInterceptor(cacheInterceptor);
          // add okLog interceptor
          builder.addInterceptor(okLogInterceptor);
      }
      return builder.build();
  }
  
  @Provides
  @Singleton
  @NonNull
  @Type.ForUploading
  public OkHttpClient provideOkHttpClientForUploading(@NonNull TokenInterceptor tokenInterceptor,
                                                      @NonNull HttpLoggingInterceptor loggingInterceptor,
                                                      @NonNull OkLogInterceptor okLogInterceptor,
                                                      @NonNull CachingInterceptor cacheInterceptor) {
      OkHttpClient.Builder builder = new OkHttpClient.Builder();
      builder.addInterceptor(tokenInterceptor);
  
      if (additionalInterceptors != null &amp;&amp; additionalInterceptors.length &gt; 0) {
          for (Interceptor interceptor : additionalInterceptors) {
              builder.addInterceptor(interceptor);
          }
      }
  
      if (onOkHttpClientForUploading == null) {
          builder.writeTimeout(60, TimeUnit.SECONDS);
          builder.connectTimeout(60, TimeUnit.SECONDS);
          builder.readTimeout(60, TimeUnit.SECONDS);
      } else {
          builder = apply(onOkHttpClientForUploading, builder);
      }
      if (debuggable) {
          // Add HttpLoggingInterceptor
          builder.addInterceptor(loggingInterceptor);
          // add cache interceptor
          builder.addNetworkInterceptor(cacheInterceptor);
          // add okLog interceptor
          builder.addInterceptor(okLogInterceptor);
      }
      return builder.build();
  }
  
  @Provides
  @Singleton
  @NonNull
  public OkLogInterceptor provideOkLogInterceptor() {
      return new OkLogInterceptor.Builder().withAllLogData().build();
  }
  
  @Provides
  @Singleton
  @NonNull
  public HttpLoggingInterceptor provideHttpLoggingInterceptor() {
      HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
      interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
      return interceptor;
  }
  
  @Provides
  @Singleton
  @NonNull
  @Type.Basic
  public Retrofit provideRetrofit(@NonNull @Type.Basic OkHttpClient client) {
      return new Retrofit.Builder()
              .baseUrl(baseUrl)
              .client(client)
              .addConverterFactory(LoganSquareConverterFactory.create())
              .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
              .build();
  }
  
  @Provides
  @Singleton
  @NonNull
  @Type.ForUploading
  public Retrofit provideRetrofitForUploading(@NonNull @Type.ForUploading OkHttpClient client) {
      return new Retrofit.Builder()
              .baseUrl(baseUrl)
              .client(client)
              .addConverterFactory(LoganSquareConverterFactory.create())
              .addCallAdapterFactory(RxJava2CallAdapterFactory.create())
              .build();
  }
  
  @Provides
  @Singleton
  @NonNull
  public CachingInterceptor provideCachingInterceptor(LoggingService loggingService) {
      return new CachingInterceptor(loggingService);
  }
  
  @Provides
  @Singleton
  @NonNull
  public TokenInterceptor provideTokenInterceptor() {
      return tokenInterceptor;
  }
  
  @Provides
  @Singleton
  @NonNull
  public BootstrapRestService provideBaseRestService(@NonNull @Type.Basic Retrofit retrofit,
                                                     @NonNull @Type.ForUploading Retrofit retrofitForUploading) {
      return bootstrapRestService.setup(retrofit, retrofitForUploading);
  }
  
  
  @NonNull
  private &lt;T, R&gt; R apply(@NonNull Function&lt;T, R&gt; f, @NonNull T t) {
      try {
          return Preconditions.checkNotNull(f.apply(t));
      } catch (Throwable ex) {
          throw new IllegalStateException("Applying function for " + t.toString() + " Threw " + ex);
      }
  }
  
  
  
   }
  </code></pre>