The Eclipse compiler is actually a different compiler than the javac compiler. Sometimes they drift in behavior, usually they migrate quickly.
This was very noticeable when Java generics appeared. There were times when eclipse either detected a bug in the generics directive that javac resolved, or javac found a bug regarding generics that would allow an eclipse (I don’t remember how it drifted separately, too long ago). In any case, javac will most likely be the correct implementation.
In your case, you pollute the namespace with a link to the common code for the inner class. The likelihood that an eclipse reaches View is in a different order of priority than javac. The odds are excellent that either Javac implements the order, as described in the Java language manual, or the Java guidelines have not yet declared a “one true order” for resolving conflicting classes with a name. This is usually not a problem because it is not permissible to use the same incompletely qualified name in Java twice; however, with inner classes, specifications can be “processed”.
I would do
public interface MyView extends View { }
attached to one view (I don’t know if com.gwtplatform.mvp.client.View
or MyPresenter.View
correct), specifying the name explicitly.
public interface MyView extends MyPresenter.View { }
or
public interface MyView extends com.gwtplatform.mvp.client.View { }
Thus, you do not fall prey to the binding interface to the wrong type, depending on the compiler.
Edwin buck
source share