JAXB Marshalling and Generics

后端 未结 5 1041
天涯浪人
天涯浪人 2020-12-17 19:29

I am trying to use JAXB\'s introspection to marshall and unmashall some existing domain objects marked up with JAXB annotations. Most things work as expected, but I am havin

5条回答
  •  眼角桃花
    2020-12-17 20:03

    So it looks like the problem is the erasure of E on start and end is Comparable. If it can't handle interfaces you could try Object, but I would hope it complains at that too (either now or later). Possibly you could make Range abstract and specialise it for each specific E. I should know more about JAXB.

提交回复
热议问题