visualization/visualization-spi-doclet/src/main/java/se/jguru/nazgul/tools/visualization/spi/doclet/javadoc/VisualizationWrappedRootDoc.java
public SortedSet<PackageDoc> findPackagesFromClassesInJavaDocRun() {

        final SortedSet<PackageDoc> toReturn = new TreeSet<>(Comparators.PACKAGE_NAME_COMPARATOR);
        final ClassDoc[] currentExecutionClasses = classes();

        if (currentExecutionClasses != null) {

            Arrays.stream(currentExecutionClasses)
                    .map(ProgramElementDoc::containingPackage)
                    .forEach(toReturn::add);
        }

        // All Done.
        return toReturn;
    }
public SortedSet<PackageDoc> findPackagesFromClassesInJavaDocRun() {

        final SortedSet<PackageDoc> toReturn = new TreeSet<>(Comparators.PACKAGE_NAME_COMPARATOR);
        final ClassDoc[] currentExecutionClasses = classes();

        if (currentExecutionClasses != null) {

            Arrays.stream(currentExecutionClasses)
                    .map(ProgramElementDoc::containingPackage)
                    .forEach(toReturn::add);
        }

        // All Done.
        return toReturn;
    }
Finds all PackageDoc objects from the classes in this JavaDoc execution.

@return a non-null (but possibly empty) SortedSet containing all {@link PackageDoc}s from the current execution.