try {
for (String pack : ClassUtil.getPackages(downloaderPackage)) {
Collection<Class> downloaderClasses = ClassUtil.getClasses(pack, IDownloader.class);
for (Class downloaderClass : downloaderClasses) {
try {
IDownloader downloader = ((IDownloader) downloaderClass.newInstance());
CheckableItem item = new CheckableItem(downloader);
item.setSelected(selectedDownloaders.contains(downloader.getClass().getName()));
downloaders.add(item);
} catch (Exception e) {
e.printStackTrace();
}
}