[英]Jibx generating toString method
I'm currently using the Jibx maven plugin to codegen Java POJOS from a defined schema. 我目前正在使用Jibx maven插件从已定义的模式对Java POJOS进行代码生成。 The code gets generated fine, but what I want is for the toString method to be generated too.
代码可以很好地生成,但是我想要的是也可以生成toString方法。 As I am round tripping from Schema to Classes I cant manually define the toString method as this will get overwritten when I re-generate.
当我从模式到类往返时,我无法手动定义toString方法,因为当我重新生成时,它将被覆盖。 And I don;t want to create a wrapper class just for the toString methods.
而且我不想只为toString方法创建包装器类。
Is there a flag option or something somewhere to say I want the toString method to be generated??? 是否有一个标志选项或某处要说的东西我想生成toString方法??? I've looked at the Jibx documentation online and could not find a straight simple answer to the above.
我在网上查看了Jibx文档,但找不到上述内容的简单答案。
Any help would be very much appreciated. 任何帮助将不胜感激。
thanks so much 非常感谢
user983022, 用户983022,
There is no automatic way to add code to a generated java clas in JiBX, but... 在JiBX中没有自动将代码添加到生成的Java clas的自动方法,但是...
You have several options to solve this problem: 您可以通过几种方法解决此问题:
I Hope this helps! 我希望这有帮助!
Don 唐
JiBX Maven plugin author JiBX Maven插件作者
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.