- Code: Select all
public class Configuration<C extends Configurable>{
static Configuration<Hamburger> hamConifg = ...;
static Configuration<Joystick> joyConfig = ...;
public static <T extends Configurable> Configuration<T> getConfigForType(Class<T> c){
if( c==Hamburger.class){
return hamConfig;
}else if(c==Joystick.class){
return joyConfig;
}
return null;
}
}
It thinks T is an actual type instead of some generic type quantifier. GWT Designer is adding error markers to all places where T exists. The error is something like "T cannot be found in source packages. You may not be inheriting some required module."
This code actually will compile in and run in GWT 1.5. Is there a workaround for this so I don't get the markers?