Here I inject a SimpleDynamicString object to my presenter in a MVP structure. To avoid a NullPointerException, I have to implement this.
@Provides
@StringForTextView
static DynamicString provideDynamicString(Application application)
{
return new SimpleDynamicString(application.getString(R.string.example_string));
}
Since I would like to use this one as a library, I am forced to implement everywhere.
Can I avoid this, so if (accidenataly or not) forgotten, no NullPointerException will happen?