parameter JAXBElement String

后端 未结 2 1170
死守一世寂寞
死守一世寂寞 2021-02-02 16:10

I\' have simple question about JAXB. Here is the sample code:

   //setter that has input JAXBElement
   b.setBIC(JAXBElement value);
2条回答
  •  情话喂你
    2021-02-02 16:59

    We can do below to create the JAXBElement object: Just for others who may have this issue, for the example given b.setBIC(JAXBElement value); Lets assume that your class is ClassB and the object is b.

    b.setBIC(new JAXBElement(new QName(ClassB.class.getSimpleName()), ClassB.class, "StringToBeInitialized"));
    

提交回复
热议问题