有人可以解释一下如何为 List<Long>
声明 JaxBElement
JAXBElement<List<Long>> jaxbElement = new JAXBElement<List<Long>>(new QName(""),
List.class,long.class, pojo.getExpectedvalue());
错误:
The constructor
JAXBElement<List<Long>>(QName, Class<list>, Class<Long>, List<Long>)
is undefined, it expects long value in parameterClass<list>
我以这种方式声明但出现错误?
最佳答案
List<JAXBElement<Long>> list = new ArrayList<JAXBElement<Long>>();
JAXBElement<List<JAXBElement<Long>>> listElement = new JAXBElement<List<JAXBElement<Long>>>(new QName("apojolist"), List.class, pojo.getExpectedvalue());
关于java - 如何为 List<Long> 元素声明 JaxBElement?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31929004/