Does GWT's ActivityMapper violate the Liskov Substitution Principle?
问题 In my GWT application, I have a class like so: public class AppActivityMapper implements ActivityMapper { @Override public Activity getActivity(Place place) { if(place instanceof ThisPlace) { return new ThisActivity((ThisPlace)place); } if(place instanceof ThatPlace) { return new ThatActivity((ThatPlace)place); } if(place instanceof AnotherPlace) { return new AnotherActivity((AnotherPlace)place); } // you get the idea } } The ActivityMapper, Activity, and Place objects are part of the