草庐IT

ElementListUnion

全部标签

android - 简单的 XML ElementListUnion - 不允许两个通用列表?

我正在尝试通过简单的框架对xml进行反序列化。我有两个列表,它们的类型只有在运行时才知道。所以我使用了@ElementListUnion。Customer.java@ElementListUnion({@ElementList(inline=true,type=Thing.class),@ElementList(inline=true,type=AnotherThing.class)})Listthings;@ElementListUnion({@ElementList(inline=true,type=Thing.class),@ElementList(inline=true,typ