app/src/main/java/com/rashwan/reactive_popular_movies/feature/discoverMovies/di/BrowseMoviesComponent.java
@PerFragment
@Subcomponent(modules = {BrowseMoviesModule.class})
public interface BrowseMoviesComponent {
    void inject(BrowseMoviesFragment target);
}
app/src/main/java/com/rashwan/reactive_popular_movies/feature/movieDetails/movieInfo/di/MovieInfoComponent.java
@PerFragment
@Subcomponent(modules = MovieInfoModule.class)
public interface MovieInfoComponent {
    void inject(MovieInfoFragment target);
}
app/src/main/java/com/rashwan/reactive_popular_movies/feature/discoverMovies/nearbyMovies/di/NearbyMoviesModule.java
@Module
public class NearbyMoviesModule {
    @Provides
    BrowseMoviesAdapter provideBrowseMoviesAdapter(){
        return new BrowseMoviesAdapter();
    }
}
app/src/main/java/com/rashwan/reactive_popular_movies/data/model/Cast.java
@AutoValue
public abstract class Cast implements Parcelable{
    public static final String QUALITY_LOW = "w342";

    public abstract long id();
    public abstract String name();
    public abstract String character();
    @Nullable @Json(name = "profile_path") public abstract String profilePath();
    @Inject public transient Application context;

    public Cast() {
        PopularMoviesApplication.getApplicationComponent().inject(this);
    }

    public String getFullProfilePath(String quality){
        String baseUrl = context.getString(R.string.poster_base_url);
        return baseUrl + quality + this.profilePath();
    }
    public static JsonAdapter<Cast> jsonAdapter(Moshi moshi){
        return new AutoValue_Cast.MoshiJsonAdapter(moshi);
    }
}
app/src/main/java/com/rashwan/reactive_popular_movies/feature/watchlistMovies/di/WatchlistComponent.java
@PerFragment
@Subcomponent(modules = WatchlistModule.class)
public interface WatchlistComponent {
    void inject(WatchlistFragment target);
}
app/src/main/java/com/rashwan/reactive_popular_movies/data/model/ActorProfileImage.java
@AutoValue
public abstract class ActorProfileImage {
    public static final String QUALITY_LOW = "w342";

    @Json(name = "file_path") public abstract String imagePath();
    @Inject public transient Application context;

    public ActorProfileImage() {
        PopularMoviesApplication.getApplicationComponent().inject(this);
    }

    public static JsonAdapter<ActorProfileImage> jsonAdapter(Moshi moshi){
        return new AutoValue_ActorProfileImage.MoshiJsonAdapter(moshi);
    }

    public String getFullImagePath(String quality){
        String baseUrl = context.getString(R.string.poster_base_url);
        return baseUrl + quality + this.imagePath();
    }
}
app/src/main/java/com/rashwan/reactive_popular_movies/feature/movieDetails/movieCast/di/MovieCastComponent.java
@PerFragment
@Subcomponent(modules = {MovieCastModule.class})
public interface MovieCastComponent {
    void inject(MovieCastFragment target);
}
app/src/main/java/com/rashwan/reactive_popular_movies/data/model/Movie.java
 @AutoValue public abstract class Movie implements Parcelable{
    public static final String QUALITY_LOW = "w342";
    public static final String QUALITY_MEDIUM = "w500";
    public static final String QUALITY_HIGH = "w780";

    public abstract long id();
    @Nullable @Json(name = "imdb_id") public abstract String ImdbId();
    public abstract String title();
    @Nullable public abstract String overview();
    public abstract long runtime();
    @Json(name = "vote_average") public abstract float tmdbRating();
    @Json(name = "release_date") public abstract String releaseDate();
    @Nullable @Json(name = "backdrop_path") public abstract String backdropPath();
    @Nullable @Json(name = "poster_path") public abstract String posterPath();


    public static Movie create(long id, String ImdbId,String title, String overview, Long runtime,
           float tmdbRating,String releaseDate, String backdropPath, String posterPath) {
        return new AutoValue_Movie(id,ImdbId,title,overview,runtime,tmdbRating,releaseDate,backdropPath,posterPath);
    }



    public static JsonAdapter<Movie> jsonAdapter(Moshi moshi){
        return new AutoValue_Movie.MoshiJsonAdapter(moshi);
    }


    public String getFormattedRuntime(Long runtime){
        int hours = (int) (runtime / 60);
        int minutes = (int) (runtime % 60);
        return hours > 1 ? String.format(Locale.getDefault(), "%d hrs %02d mins", hours, minutes)
                : String.format(Locale.getDefault(), "%d hr %02d mins", hours, minutes);
    }

}
app/src/main/java/com/rashwan/reactive_popular_movies/feature/discoverMovies/nearbyMovies/di/NearbyMoviesComponent.java
@PerFragment
@Subcomponent(modules = NearbyMoviesModule.class)
public interface NearbyMoviesComponent {
    void inject(NearbyMoviesFragment target);
}
app/src/main/java/com/rashwan/reactive_popular_movies/feature/movieDetails/movieReviews/di/MovieReviewsComponent.java
@PerFragment
@Subcomponent(modules = MovieReviewsModule.class)
public interface MovieReviewsComponent {
    void inject(MovieReviewsFragment target);
}
app/src/main/java/com/rashwan/reactive_popular_movies/feature/movieDetails/movieCast/di/MovieCastModule.java
@Module
public class MovieCastModule {
    @Provides
    public MovieCastAdapter provideMovieCastAdapter(){
        return new MovieCastAdapter();
    }
}
app/src/main/java/com/rashwan/reactive_popular_movies/feature/watchlistMovies/di/WatchlistModule.java
@Module
public class WatchlistModule {

    @Provides
    BrowseMoviesAdapter provideBrowseMoviesAdapter(){
        return new BrowseMoviesAdapter();
    }
}
app/src/main/java/com/rashwan/reactive_popular_movies/PopularMoviesApplication.java
public class PopularMoviesApplication extends Application {
    private static ApplicationComponent applicationComponent;
    private BrowseMoviesComponent browseMoviesComponent;
    private MovieDetailsComponent movieDetailsComponent;
    private MovieInfoComponent movieInfoComponent;
    private NearbyMoviesComponent nearbyMoviesComponent;
    private FavoriteMoviesComponent favoriteMoviesComponent;
    private WatchlistComponent watchlistComponent;
    private MovieReviewsComponent movieReviewsComponent;
    private MovieCastComponent movieCastComponent;
    private ActorInfoComponent actorInfoComponent;
    private ActorMoviesComponent actorMoviesComponent;
    private ActorDetailsComponent actorDetailsComponent;

    @Override
    public void onCreate() {
        super.onCreate();
        if (LeakCanary.isInAnalyzerProcess(this)) {
            // This process is dedicated to LeakCanary for heap analysis.
            // You should not init your app in this process.
            return;
        }
        LeakCanary.install(this);
        applicationComponent = createAppComponent();

        Timber.plant(new Timber.DebugTree() {
            @Override
            protected String createStackElementTag(StackTraceElement element) {
                return super.createStackElementTag(element) + ':' + element.getLineNumber();
            }
        });


    }

    private ApplicationComponent createAppComponent() {
        return DaggerApplicationComponent.builder().applicationModule(new ApplicationModule(this))
                .castRepositoryModule(new CastRepositoryModule())
                .moviesRepositoryModule(new MoviesRepositoryModule())
                .build();
    }

    public BrowseMoviesComponent createBrowseMoviesComponent(){
         browseMoviesComponent = applicationComponent.plus(new BrowseMoviesModule());

        return browseMoviesComponent;
    }

    public MovieDetailsComponent createMovieDetailsComponent(){
        movieDetailsComponent = applicationComponent.plusMovieDetailsComponent();
        return movieDetailsComponent;
    }

    public NearbyMoviesComponent createNearbyMoviesComponent(){
        nearbyMoviesComponent = applicationComponent.plus(new NearbyMoviesModule());
        return nearbyMoviesComponent;
    }

    public FavoriteMoviesComponent createFavoriteMoviesComponent(){
        favoriteMoviesComponent = applicationComponent.plus(new FavoriteMoviesModule());
        return favoriteMoviesComponent;
    }

    public WatchlistComponent createWatchlistComponent(){
        watchlistComponent = applicationComponent.plus(new WatchlistModule());
        return watchlistComponent;
    }
    public MovieInfoComponent createMovieInfoComponent(){
        movieInfoComponent = applicationComponent.plus(new MovieInfoModule());
        return movieInfoComponent;
    }
    public MovieReviewsComponent createMovieReviewsComponent(){
        movieReviewsComponent = applicationComponent.plus(new MovieReviewsModule());
        return movieReviewsComponent;
    }
    public MovieCastComponent createMovieCastComponent(){
        movieCastComponent = applicationComponent.plus(new MovieCastModule());
        return movieCastComponent;
    }

    public ActorInfoComponent createActorInfoComponent(){
        actorInfoComponent = applicationComponent.plus(new ActorInfoModule());
        return actorInfoComponent;
    }

    public ActorMoviesComponent createActorMoviesComponent(){
        actorMoviesComponent = applicationComponent.plus(new ActorMoviesModule());
        return actorMoviesComponent;
    }
    public ActorDetailsComponent createActorDetailsComponent(){
        actorDetailsComponent = applicationComponent.plusActorDetailsComponent();
        return actorDetailsComponent;
    }


    public void releaseBrowseMoviesComponent(){
        browseMoviesComponent = null;
    }
    public void releaseMovieDetailsComponent(){
        movieDetailsComponent = null;
    }
    public void releaseNearbyMoviesComponent(){
        nearbyMoviesComponent = null;
    }
    public void releaseFavoriteMoviesComponent(){
        favoriteMoviesComponent = null;
    }
    public void releaseWatchlistMoviesComponent(){
        watchlistComponent = null;
    }
    public void releaseMovieInfoComponent(){
        movieInfoComponent = null;
    }
    public void releaseMovieReviewsComponent(){
        movieReviewsComponent = null;
    }
    public void releaseMovieCastComponent(){
        movieCastComponent = null;
    }
    public void releaseActorInfoComponent(){actorInfoComponent = null;}
    public void releaseActorMoviesComponent(){actorMoviesComponent = null;}
    public void releaseActorDetailsComponent(){actorDetailsComponent = null;}



    public static ApplicationComponent getApplicationComponent(){
        return applicationComponent;
    }
}
app/src/main/java/com/rashwan/reactive_popular_movies/feature/movieDetails/di/MovieDetailsComponent.java
@PerFragment
@Subcomponent
public interface MovieDetailsComponent {
    void inject(MovieDetailsActivity target);
}
app/src/main/java/com/rashwan/reactive_popular_movies/feature/actorDetails/actorMovies/injection/ActorMoviesModule.java
@Module
public class ActorMoviesModule {
    @Provides
    ActorMoviesAdapter provideActorMoviesAdapter(){
        return new ActorMoviesAdapter();
    }
}
app/src/main/java/com/rashwan/reactive_popular_movies/data/di/CastRepositoryModule.java
@Module
public class CastRepositoryModule {
    @Local
    @Provides @Singleton
    CastDataSource provideCastLocalDataSource(){
        return new CastLocalDataSource();
    }

    @Remote
    @Provides @Singleton
    CastDataSource provideCastRemoteDataSource(Application application,@Named("TMDBRetrofit") Retrofit retrofit){
        return new CastRemoteDataSource(application,retrofit);
    }
}
app/src/main/java/com/rashwan/reactive_popular_movies/feature/discoverMovies/di/BrowseMoviesModule.java
@Module
public class BrowseMoviesModule {

    @Provides
    public BrowseMoviesAdapter provideBrowseMoviesAdapter(){
        return new BrowseMoviesAdapter();
    }
}
app/src/main/java/com/rashwan/reactive_popular_movies/feature/actorDetails/actorMovies/injection/ActorMoviesComponent.java
@PerFragment
@Subcomponent(modules = ActorMoviesModule.class)
public interface ActorMoviesComponent {
    void inject(ActorMoviesFragment target);
}
app/src/main/java/com/rashwan/reactive_popular_movies/feature/movieDetails/movieReviews/di/MovieReviewsModule.java
@Module
public class MovieReviewsModule {
    @Provides
    public MovieReviewsAdapter provideMovieReviewsAdapter(){
        return new MovieReviewsAdapter();
    }
}
app/src/main/java/com/rashwan/reactive_popular_movies/feature/actorDetails/actorInfo/injection/ActorInfoModule.java
@Module
public class ActorInfoModule {

    @Provides
    ActorProfileImagesAdapter provideActorProfileImagesAdapter(){
        return new ActorProfileImagesAdapter();
    }
}
app/src/main/java/com/rashwan/reactive_popular_movies/feature/favoriteMovies/di/FavoriteMoviesComponent.java
@PerFragment
@Subcomponent(modules = FavoriteMoviesModule.class)
public interface FavoriteMoviesComponent {
    void inject(FavoriteMoviesFragment target);
}
app/src/main/java/com/rashwan/reactive_popular_movies/feature/favoriteMovies/di/FavoriteMoviesModule.java
@Module
public class FavoriteMoviesModule {
    @Provides
    public BrowseMoviesAdapter provideBrowseMoviesAdapter(){
        return new BrowseMoviesAdapter();
    }
}
app/src/main/java/com/rashwan/reactive_popular_movies/data/di/MoviesRepositoryModule.java
@Module
public class MoviesRepositoryModule {
    @Provides @Singleton @Local
    public MoviesDataSource provideMoviesLocalDataSource(BriteDatabase db){
        return new MoviesLocalDataSource(db);
    }
    @Provides @Singleton @Remote
    public MoviesDataSource provideMoviesRemoteDataSource(Application application
            , @Named("TMDBRetrofit") Retrofit tmdbRetrofit
            , @Named("OMDBRetrofit") Retrofit omdbRetrofit){
        return new MoviesRemoteDataSource(application,tmdbRetrofit,omdbRetrofit);
    }
}
app/src/main/java/com/rashwan/reactive_popular_movies/data/model/Trailer.java
@AutoValue public abstract class Trailer {
    @Inject public transient Application context;
    @Json(name = "key") public abstract String youtubeUrl();
    public abstract String name();
    public abstract String type();

    public Trailer() {
        PopularMoviesApplication.getApplicationComponent().inject(this);
    }

    public static JsonAdapter<Trailer> jsonAdapter(Moshi moshi){
        return new AutoValue_Trailer.MoshiJsonAdapter(moshi);
    }

    public String getTrailerThumbnail(){
        String baseUrl = context.getString(R.string.trailer_youtube_thumbnail);
        return String.format(baseUrl,youtubeUrl());
    }
    public Uri getFullYoutubeUri(){
        String baseUrl = context.getString(R.string.trailer_youtube_video);
        return Uri.parse(baseUrl).buildUpon()
                .appendQueryParameter("v",this.youtubeUrl()).build();
    }

}
app/src/main/java/com/rashwan/reactive_popular_movies/feature/actorDetails/injection/ActorDetailsComponent.java
@PerFragment
@Subcomponent
public interface ActorDetailsComponent {
    void inject(ActorDetailsActivity target);
}
app/src/main/java/com/rashwan/reactive_popular_movies/feature/movieDetails/movieInfo/di/MovieInfoModule.java
@Module
public class MovieInfoModule {
    @Provides
    MovieTrailersAdapter providesMovieTrailersAdapter(){
        return new MovieTrailersAdapter();
    }
    @Provides
    SimilarMoviesAdapter providesSimilarMoviesAdapter(){
        return new SimilarMoviesAdapter();
    }
}
app/src/main/java/com/rashwan/reactive_popular_movies/data/model/ActorTaggedImage.java
@AutoValue
public abstract class ActorTaggedImage {
    public static final String QUALITY_LOW = "w342";
    public static final String QUALITY_MEDIUM = "w500";
    @Json(name = "file_path") public abstract String imagePath();
    @Json(name = "aspect_ratio") public abstract double aspectRatio();
    @Inject public transient Application context;

    public ActorTaggedImage() {
        PopularMoviesApplication.getApplicationComponent().inject(this);
    }



    public static JsonAdapter<ActorTaggedImage> jsonAdapter(Moshi moshi){
        return new AutoValue_ActorTaggedImage.MoshiJsonAdapter(moshi);
    }
    public String getFullImagePath(String quality){
        String baseUrl = context.getString(R.string.poster_base_url);
        return baseUrl + quality + this.imagePath();
    }
}
app/src/main/java/com/rashwan/reactive_popular_movies/feature/actorDetails/actorInfo/injection/ActorInfoComponent.java
@PerFragment
@Subcomponent(modules = ActorInfoModule.class)
public interface ActorInfoComponent {
    void inject(ActorInfoFragment target);
}


Question: package com.rashwan.reactive_popular_movies.dI;
import com.rashwan.reactive_popular_movies.PopularMoviesApplication;
import com.rashwan.reactive_popular_movies.data.di.CastRepositoryModule;
import com.rashwan.reactive_popular_movies.data.di.MoviesRepositoryModule;
import com.rashwan.reactive_popular_movies.data.model.ActorProfileImage;
import com.rashwan.reactive_popular_movies.data.model.ActorTaggedImage;
import com.rashwan.reactive_popular_movies.data.model.Cast;
import com.rashwan.reactive_popular_movies.data.model.Movie;
import com.rashwan.reactive_popular_movies.data.model.Trailer;
import com.rashwan.reactive_popular_movies.feature.actorDetails.actorInfo.injection.ActorInfoComponent;
import com.rashwan.reactive_popular_movies.feature.actorDetails.actorInfo.injection.ActorInfoModule;
import com.rashwan.reactive_popular_movies.feature.actorDetails.actorMovies.injection.ActorMoviesComponent;
import com.rashwan.reactive_popular_movies.feature.actorDetails.actorMovies.injection.ActorMoviesModule;
import com.rashwan.reactive_popular_movies.feature.actorDetails.injection.ActorDetailsComponent;
import com.rashwan.reactive_popular_movies.feature.discoverMovies.di.BrowseMoviesComponent;
import com.rashwan.reactive_popular_movies.feature.discoverMovies.di.BrowseMoviesModule;
import com.rashwan.reactive_popular_movies.feature.discoverMovies.nearbyMovies.di.NearbyMoviesComponent;
import com.rashwan.reactive_popular_movies.feature.discoverMovies.nearbyMovies.di.NearbyMoviesModule;
import com.rashwan.reactive_popular_movies.feature.favoriteMovies.di.FavoriteMoviesComponent;
import com.rashwan.reactive_popular_movies.feature.favoriteMovies.di.FavoriteMoviesModule;
import com.rashwan.reactive_popular_movies.feature.movieDetails.di.MovieDetailsComponent;
import com.rashwan.reactive_popular_movies.feature.movieDetails.movieCast.di.MovieCastComponent;
import com.rashwan.reactive_popular_movies.feature.movieDetails.movieCast.di.MovieCastModule;
import com.rashwan.reactive_popular_movies.feature.movieDetails.movieInfo.di.MovieInfoComponent;
import com.rashwan.reactive_popular_movies.feature.movieDetails.movieInfo.di.MovieInfoModule;
import com.rashwan.reactive_popular_movies.feature.movieDetails.movieReviews.di.MovieReviewsComponent;
import com.rashwan.reactive_popular_movies.feature.movieDetails.movieReviews.di.MovieReviewsModule;
import com.rashwan.reactive_popular_movies.feature.watchlistMovies.di.WatchlistComponent;
import com.rashwan.reactive_popular_movies.feature.watchlistMovies.di.WatchlistModule;
import javax.inject.Singleton;
import dagger.Component;




/**
 * Created by rashwan on 6/24/16.
 */
@Singleton
@Component(modules = {ApplicationModule.class, CastRepositoryModule.class, MoviesRepositoryModule.class})
public interface ApplicationComponent {
    void inject(PopularMoviesApplication target);
    void inject(Movie target);
    void inject(Trailer target);
    void inject(Cast target);
    void inject(ActorTaggedImage target);
    void inject(ActorProfileImage target);

    BrowseMoviesComponent plus(BrowseMoviesModule browseMoviesModule);
    MovieDetailsComponent plusMovieDetailsComponent();
    MovieInfoComponent plus(MovieInfoModule movieInfoModule);
    MovieReviewsComponent plus(MovieReviewsModule movieReviewsModule);
    NearbyMoviesComponent plus(NearbyMoviesModule nearbyMoviesModule);
    FavoriteMoviesComponent plus(FavoriteMoviesModule favoriteMoviesModule);
    WatchlistComponent plus(WatchlistModule watchlistModule);
    MovieCastComponent plus(MovieCastModule movieCastModule);
Answer:     ActorDetailsComponent plusActorDetailsComponent();