public static Set<Class> getClassesInPackage(String packageName) {
	Set<Class> classes = new HashSet<Class>();
	String packageNameSlashed = "/" + packageName.replace(".", "/");
	// Get a File object for the package
	URL directoryURL = Thread.currentThread().getContextClassLoader()
		.getResource(packageNameSlashed);
	if (directoryURL == null) {
	    // LOG.warn("Could not retrieve URL resource: " +
	    // packageNameSlashed);
	    return classes;
	}

	String directoryString = directoryURL.getFile();
	if (directoryString == null) {
	    // LOG.warn("Could not find directory for URL resource: " +
	    // packageNameSlashed);
	    return classes;
	}

	File directory = new File(directoryString);
	if (directory.exists()) {
	    // Get the list of the files contained in the package
	    String[] files = directory.list();
	    for (String fileName : files) {
		// We are only interested in .class files
		if (fileName.endsWith(".class")) {
		    // Remove the .class extension
		    fileName = fileName.substring(0, fileName.length() - 6);
		    try {
            classes.add(Reflector.classForName(packageName + "." + fileName));
		    } catch (ClassNotFoundException e) {
			// LOG.warn(packageName + "." + fileName +
			// " does not appear to be a valid class.", e);
		    }
		}
	    }
	} else {
	    // LOG.warn(packageName +
	    // " does not appear to exist as a valid package on the file system.");
	}
	return classes;
    }