class Bar { void bar(Object[] components) { for (int i = 0; i < components.length; ++i) if (components[i] != null) addChildren(components[i]); } }