我的IDE突出显示presenter.setView
并发出警告Unchecked call to setView(V) as a member of raw type 'IBaseActivity.Presenter'
有人知道我在哪里犯错了吗?我想整天,我不知道该改善什么
public abstract class BaseMvpActivity<T extends IBaseActivity.Presenter> extends BaseActivity implements IBaseActivity.View {
@Inject
protected T presenter;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
presenter.setView(this);
}
界面:
public interface IBaseActivity {
interface View {
}
interface Presenter<V>{
void setView(V view);
}
}