Back to project page UpcomingMoviesMVP.
The source code is released under:
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Defi...
If you think the Android project UpcomingMoviesMVP listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.jlmd.android.newfilmsmvp.di.module; /*from w w w . ja v a2s . co m*/ import android.content.Context; import com.google.gson.Gson; import com.jlmd.android.newfilmsmvp.api.mapper.Mapper; import com.jlmd.android.newfilmsmvp.api.mapper.MovieDetailsMapper; import com.jlmd.android.newfilmsmvp.api.mapper.UpcomingMoviesMapper; import com.jlmd.android.newfilmsmvp.api.mock.MockedMovieDetailsApi; import com.jlmd.android.newfilmsmvp.api.mock.MockedUpcomingMoviesApi; import com.jlmd.android.newfilmsmvp.api.moviedetails.MovieDetailsApi; import com.jlmd.android.newfilmsmvp.api.upcomingmovies.UpcomingMoviesApi; import javax.inject.Named; import javax.inject.Singleton; import dagger.Module; import dagger.Provides; /** * @author jlmd */ @Module( complete = false, library = true ) public class RepositoryModule { @Provides @Named("upcomingmovies") @Singleton public Mapper providesUpcomingMoviesMapper() { return new UpcomingMoviesMapper(); } @Provides @Named("moviedetails") @Singleton public Mapper providesMovieDetailsMapper() { return new MovieDetailsMapper(); } @Provides @Singleton public Gson providesGson() { return new Gson(); } @Provides @Singleton public UpcomingMoviesApi providesUpcomingMoviesApi(Context appContext, @Named("upcomingmovies") final Mapper mapper, Gson gson) { return new MockedUpcomingMoviesApi(appContext, mapper, gson); } @Provides @Singleton public MovieDetailsApi providesMovieDetailsApi(Context appContext, @Named("moviedetails") final Mapper mapper, Gson gson) { return new MockedMovieDetailsApi(appContext, mapper, gson); } }