org.eclipse.jdt.core.dom.Javadoc.toString()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(148)

本文整理了Java中org.eclipse.jdt.core.dom.Javadoc.toString()方法的一些代码示例,展示了Javadoc.toString()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Javadoc.toString()方法的具体详情如下:
包路径:org.eclipse.jdt.core.dom.Javadoc
类名称:Javadoc
方法名:toString

Javadoc.toString介绍

暂无

代码示例

代码示例来源:origin: feenkcom/jdt2famix

public void ensureCommentFromBodyDeclaration(SourcedEntity entity, BodyDeclaration node) {
  if (node.getJavadoc() != null)
    createBasicComment(entity, node.getJavadoc().toString());
  else {
    // if there is no javadoc, we look for single line or multi line comments before
    // the node
    CompilationUnit root = (CompilationUnit) node.getRoot();
    int firstLeadingCommentIndex = root.firstLeadingCommentIndex(node);
    if (firstLeadingCommentIndex >= 0)
      // There seems to be a problem here: JDT does not seem to provide the contents
      // of the comments.
      // Only the types (one line or multi line).
      createBasicComment(entity, root.getCommentList().get(firstLeadingCommentIndex).toString());
  }
}

代码示例来源:origin: windup/windup

if (typeDeclaration.getJavadoc() != null)
  typeLine = typeLine.substring(typeDeclaration.getJavadoc().toString().length());

代码示例来源:origin: jboss-fuse/fabric8

String comment = null;
if (doc != null) {
  comment = method.getJavadoc().toString();

相关文章