public interface Validator<T extends BaseParam> {
List<Type> getTypes();
}
public class Service {
public void test() {
List<Validator> list = new ArrayList<>();
for (Validator v : list) {
List<Type> types = v.getTypes(); //问这行会不会报unchecked warning
}
}
}
--
FROM 103.202.147.*