Support writing needed extension types

ditto w/ `mapv` vs. `map`.

Also, the docstring on this function seems to suggest that this should return something like a `java.util.Set` here.