I'm confused by the scenario described below where I am extending a generic class. The class I am extending is below:
public abstract class PresenterWidget<V extends View> extends HandlerContainerImpl
...
At first, I had this working (warning free) using the child class below:
public abstract class SideBarPresenter<V extends SideBarPresenter.MyView> extends PresenterWidget<SideBarPresenter.MyView> {
interface MyView extends View {
void doSomething();
}
...
But I want to convert MyView
to an abstract class so I can implement a method. The way I think it makes sense is below.
public abstract class SideBarPresenter<V extends SideBarPresenter.MyView> extends PresenterWidget<SideBarPresenter.MyView> {
abstract class MyView implements View {
void doSomething() {}
}
...
The problem is this produces 2 warnings, both stating:
SideBarPresenter.MyView is a raw type. References to generic type SideBarPresenter.MyView should be parameterized
Should I just ignore this warning or is there a better way to do this?