if (!classesBySuperclass.containsKey(requiredInterface)) {
classesBySuperclass.put(requiredInterface, findClassesImpl(requiredInterface));
}
} catch (Exception e) {
throw new ServiceNotFoundException(e);
}
List<Class> classes = classesBySuperclass.get(requiredInterface);
HashSet<Class> uniqueClasses = new HashSet<Class>(classes);
return uniqueClasses.toArray(new Class[uniqueClasses.size()]);