Expose elementType of EnumSet and EnumMap

Stephen Colebourne scolebourne at joda.org
Sat Sep 21 23:15:08 UTC 2013

FWIW, I'm surprised that these methods don't exist. I've not hit the
problem myself but I know I'd curse if I discovered their absence.

 On 21 Sep 2013 08:35, "Marcin Wiśnicki" <mwisnicki at gmail.com> wrote:

> Third party serialization libraries and other tools need to know the
> type of EnumSet elementType. Currently this field is package-private
> and said libraries have to resort to non-portable reflection hacks.
> Please add EnumSet#getElementType() and EnumMap#getKeyType() methods.
> I've submitted this request to bugs.sun.com last month, where it
> received Bug Id: 9006352. There was no further communication and that
> bug is still not visible which doesn't surprise me as I've never had
> any luck with bugs.sun.com even when submitting actual bug :(
> PS. Please keep me CC'ed.

More information about the core-libs-dev mailing list