code: private static Set<TypeMirror> topLevelTypes(Types typeUtil, Set<TypeMirror> types) {
      return types
          .stream()
          .map(typeMirror -> MoreElements.asType(typeUtil.asElement(typeMirror)))
          .map(typeElement -> topLevelType(typeElement).asType())
          .collect(toCollection(TypeMirrorSet::new));
    }
docs: Finds the top-level types for all the declared types (classes and interfaces) in the given
  {@code Set<TypeMirror>}.
  
  <p>The returned set contains only top-level types. If we reference {@code java.util.Map.Entry}
  then the returned set will contain {@code java.util.Map}. This is because we want to write
  {@code Map.Entry} everywhere rather than {@code Entry}.