JAXB
doesn't let you unmarshal already existing xml structures into HashMap
s if they are not exactly the way JAXB
expects them.
JAXB
is fine with handling e.g. LinkedList
s and filling them.
I was thinking of creating a interface with a getKey()
method and a wrapper around the HashMap
taking all objects that implement that interface. The wrapper can then use the getKey()
method for all key related features of the map. The wrapper could then easily implement the Collection
or List
interface.
Because this idea doesn't seem to innovative to me I presume that it already exists in some package, but I'm not googling correctly for it... Can someone please name a good lib that can do this, or do I have to code this myself?