简体   繁体   中英

How can I force HyperJaxb to generate toString() method?

I'm trying to generate Entity classess from xsd files using HyperJaxb3. It works fine but what I need is to have toString() method in those classes. What I get is only hashCode() and equals() methods. How can I convince HyperJaxb3 to generate toString() method too?

I would appreciate your help!

Ok, so I figured it out thanks to this url: https://wikis.oracle.com/display/GlassFish/Hyperjaxb3Configuration

I just added:

<args>
    <arg>-XtoString</arg>
</args>

inside the <configuration> tag of hyperjaxb3 in pom.xml of the maven project and that made it work!

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