public Map<String, PubApi> getPubapis(Collection<JavaFileObject> explicitJFOs, boolean explicits) {

        // Maps ":java.lang" to a package level pub api (with only types on top level)
        Map<String, PubApi> result = new HashMap<>();
        for (ClassSymbol cs : publicApiPerClass.keySet()) {

            boolean amongExplicits = explicitJFOs.contains(cs.sourcefile);
            if (explicits != amongExplicits)
                continue;

            String pkg = ":" + cs.packge().fullname;
            PubApi currentPubApi = result.getOrDefault(pkg, new PubApi());
            result.put(pkg, PubApi.mergeTypes(currentPubApi, publicApiPerClass.get(cs)));
        }

        return result;
    }
public Map < String , PubApi > getPubapis ( Collection < JavaFileObject > explicitJFOs , boolean explicits ) { Map < String , PubApi > result = new HashMap < > ( ) ; for ( ClassSymbol cs : publicApiPerClass . keySet ( ) ) { boolean amongExplicits = explicitJFOs . contains ( cs . sourcefile ) ; if ( explicits != amongExplicits ) continue ; String pkg = ":" + cs . packge ( ) . fullname ; PubApi currentPubApi = result . getOrDefault ( pkg , new PubApi ( ) ) ; result . put ( pkg , PubApi . mergeTypes ( currentPubApi , publicApiPerClass . get ( cs ) ) ) ; } return result ; }
Convert the map from class names to their pubapi to a map
from package names to their pubapi.