private Set<Class<?>> getFromDirectory(final File directory, final String packageName) {
        final Set<Class<?>> classes = new HashSet<Class<?>>();

        if (directory.exists()) {
            final File[] files = directory.listFiles();

            for (final File file : files) {
                if (file.isDirectory()) {
                    classes.addAll(getFromDirectory(file, packageName + "." + file.getName()));
                }

                else if (isClass(file.getName())) {
                    final String className = packageName + '.' + stripFilenameExtension(file.getName());
                    final Class<?> clazz = loadClass(className);
                    addClass(clazz, classes);
                }
            }
        }

        return classes;
    }