*
* @param necessaries
* @return
*/
private Set<Class> collect() {
Set<Class> set = new CopyOnWriteArraySet();
set.addAll(classes);
for (Class clazz : classes) {
set.add(clazz);
if (Extensible.class.isAssignableFrom(clazz)) {
for (Class<Extensible> extension : I.findAs((Class<Extensible>) clazz)) {
set.add(extension);
}
}
}
return set;
}