admin管理员组文章数量:1399925
I am using OpenRewrite 8.48 and want to add @author to the Javadoc of methods that don't yet have that. Only thing I was able to achieve so far is to add a text comment like so:
TextComment textComment = new TextComment(true, "foobar",methodDeclaration.getPrefix().getWhitespace(), Markers.EMPTY);
return methodDeclaration.withComments(ListUtils.concat(md.getComments(), textComment));
Now, there is Javadoc.Author
but that requires a list of Javadoc instances which I don't have since I can't initialize any...
For this reason Author author = new Author(UUID.randomUUID(), Markers.EMPTY, ???);
fails. The documentation only lists examples of removing Javadoc which does not help here.
So, how do I add something to the Javadoc? Also, in this case where would I even put the actual author info?
本文标签: javaHow to add author to the Javadoc with OpenRewriteStack Overflow
版权声明:本文标题:java - How to add @author to the Javadoc with OpenRewrite? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744201430a2594980.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论