[英]How can I force HyperJaxb to generate toString() method?
I'm trying to generate Entity classess from xsd files using HyperJaxb3. 我正在尝试使用HyperJaxb3从xsd文件生成实体classess。 It works fine but what I need is to have toString() method in those classes.
它工作正常但我需要的是在这些类中使用toString()方法。 What I get is only hashCode() and equals() methods.
我得到的只是hashCode()和equals()方法。 How can I convince HyperJaxb3 to generate toString() method too?
我怎样才能说服HyperJaxb3生成toString()方法呢?
I would appreciate your help! 非常感谢你的帮助!
Ok, so I figured it out thanks to this url: https://wikis.oracle.com/display/GlassFish/Hyperjaxb3Configuration 好的,所以我想通过这个网址来了解它: 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! 在maven项目的
pom.xml
中的hyperjaxb3的<configuration>
标签内部,它使它工作!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.