This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Generated( | |
value = "dagger.internal.codegen.ComponentProcessor", | |
comments = "https://google.github.io/dagger" | |
) | |
public final class DemoApplication_MembersInjector implements MembersInjector<DemoApplication> { | |
private final Provider<DataManager> dataManagerProvider; | |
public DemoApplication_MembersInjector(Provider<DataManager> dataManagerProvider) { | |
this.dataManagerProvider = dataManagerProvider; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Generated( | |
value = "dagger.internal.codegen.ComponentProcessor", | |
comments = "https://google.github.io/dagger" | |
) | |
public final class DaggerApplicationComponent implements ApplicationComponent { | |
private ApplicationModule applicationModule; | |
private ApplicationModule_ProvideContextFactory provideContextProvider; | |
private ApplicationModule_ProvideDatabaseNameFactory provideDatabaseNameProvider; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Generated( | |
value = "dagger.internal.codegen.ComponentProcessor", | |
comments = "https://google.github.io/dagger" | |
) | |
public final class ApplicationModule_ProvideDatabaseNameFactory implements Factory<String> { | |
private final ApplicationModule module; | |
public ApplicationModule_ProvideDatabaseNameFactory(ApplicationModule module) { | |
this.module = module; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Singleton | |
public class DataManager { | |
private Context mContext; | |
private DbHelper mDbHelper; | |
private SharedPrefsHelper mSharedPrefsHelper; | |
@Inject | |
public DataManager(@ApplicationContext Context context, | |
DbHelper dbHelper, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity extends AppCompatActivity { | |
@Inject | |
DataManager mDataManager; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DemoApplication extends Application { | |
protected ApplicationComponent applicationComponent; | |
@Inject | |
DataManager dataManager; | |
public static DemoApplication get(Context context) { | |
return (DemoApplication) context.getApplicationContext(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@PerActivity | |
@Component(dependencies = ApplicationComponent.class, modules = ActivityModule.class) | |
public interface ActivityComponent { | |
void inject(MainActivity mainActivity); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Singleton | |
@Component(modules = ApplicationModule.class) | |
public interface ApplicationComponent { | |
void inject(DemoApplication demoApplication); | |
@ApplicationContext | |
Context getContext(); | |
Application getApplication(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Module | |
public class ActivityModule { | |
private Activity mActivity; | |
public ActivityModule(Activity activity) { | |
mActivity = activity; | |
} | |
@Provides |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Module | |
public class ApplicationModule { | |
private final Application mApplication; | |
public ApplicationModule(Application app) { | |
mApplication = app; | |
} | |
@Provides |
NewerOlder