简体   繁体   English

如何从JAXBElement <Object>获取对象

[英]How do I get the object from JAXBElement<Object>

I have : 我有 :

JAXBElement<ArrayOfLeadRecord> r = l.getLeadRecordList() ;

How can I get the actual ArrayOfLeadRecord as an object? 如何将实际的ArrayOfLeadRecord作为对象? It took me so long to unmarshal/convert this JAXBElement to the actual object I want. 我花了很长时间才将这个JAXBElement解组/转换为我想要的实际对象。
Thanks a lot.... 非常感谢....

You need to use the getValue() method. 您需要使用getValue()方法。

 JAXBElement<ArrayOfLeadRecord> r = l.getLeadRecordList() ;
 List<LeadRecordList> leadRecordList = r.getValue().getLeadRecordList();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM