简体   繁体   中英

JAXB marshaller no-arg default constructor

I would like to marshalling a java object from a java library.

When marshalling a java object using JAXB marschaller, I have got a problem:

class A does not have a no-arg default constructor

I used a Java Decomplier to check the class a implementation, it is like this:

public final class AImpl
  implements A

That means I can not extends class AImpl .

So How can I fix the problem with no-arg default constructor?

How do you know values that should be passed to that constructor then?

I think you will need to override Binder class to unmarshall objects by yourself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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