Insert custom annotation in java 'field' using annotate plugin + JAXB (upon xsd -> java)

佐手、 提交于 2019-11-30 18:55:22

Ok, you figured it out yourself. Use <annox:annotate target="field"> to annotate a field. Other options are:

  • setter
  • setter-parameter
  • getter
  • field
  • class

See the documentation.

Just one more thing: you need to put the field attribute to the outer <annox:annotate> tag:

<annox:annotate target="field">
    <annox:annotate annox:class="java.lang.SuppressWarnings"/>
</annox:annotate>

Putting it to the same tag as the annox:class attribute resides might not work. That happend to me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!