@Override
    public Iterable<JavaFileObject> list(Location location, String packageName,
            Set<Kind> kinds, boolean recurse) throws IOException {
        //Special handling for Privateer classes when building with Maven
        //Maven does not set the classpath but instead uses a custom
        //classloader to load test classes which means the compiler
        //tool cannot normally see standard Privateer classes so
        //we put in a workaround here
        if (StandardLocation.CLASS_PATH == location && kinds.contains(Kind.CLASS)) {
            List<JavaFileObject> results = new ArrayList<JavaFileObject>();
            Iterable<JavaFileObject> superResults = super.list(location, packageName, kinds, recurse);
            for (JavaFileObject superResult : superResults) {
                results.add(superResult);
            }
            //Now process classpath URLs
            for (URL curClassPathUrl : classPathUrls) {
                String directory = packageName.replace('.', '/') + '/';
                URL loadUrl = new URL(curClassPathUrl, directory);
                try {
                    List<JavaFileObject> additionalClasses = listClassesFromUrl(loadUrl, packageName);
                    results.addAll(additionalClasses);
                } catch (IOException e) {
                    //This happens if the file does not exist
                    //Move onto next one
                }
            }
            return results;
        } else {
            Iterable<JavaFileObject> results = super.list(location, packageName, kinds, recurse);
            return results;
        }
    }