import java.util.Collection; class Test { void foo() { for (Number extension : getExtensions()) { } } Collection getExtensions() {return null;} }