Пример #1
0
 /**
  * Gets next sibling of specified node with the specified type.
  *
  * @param node DetailNode
  * @param tokenType javadoc token type
  * @return next sibling.
  */
 public static DetailNode getNextSibling(DetailNode node, int tokenType) {
   DetailNode nextSibling = JavadocUtils.getNextSibling(node);
   while (nextSibling != null && nextSibling.getType() != tokenType) {
     nextSibling = JavadocUtils.getNextSibling(nextSibling);
   }
   return nextSibling;
 }
Пример #2
0
 /**
  * Gets tag name from javadocTagSection.
  *
  * @param javadocTagSection to get tag name from.
  * @return name, of the javadocTagSection's tag.
  */
 public static String getTagName(DetailNode javadocTagSection) {
   String javadocTagName;
   if (javadocTagSection.getType() == JavadocTokenTypes.JAVADOC_INLINE_TAG) {
     javadocTagName =
         JavadocUtils.getNextSibling(JavadocUtils.getFirstChild(javadocTagSection)).getText();
   } else {
     javadocTagName = JavadocUtils.getFirstChild(javadocTagSection).getText();
   }
   return javadocTagName;
 }
 /**
  * Checks if comment has in-line tags which are not ignored.
  *
  * @param javadocRoot javadoc root node.
  * @return true, if comment has in-line tags which are not ignored.
  * @see <a href=
  *     http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#javadoctags>
  *     JavadocTags</a>
  */
 private boolean hasJavadocInlineTags(DetailNode javadocRoot) {
   DetailNode javadocTagSection =
       JavadocUtils.findFirstToken(javadocRoot, JavadocTokenTypes.JAVADOC_INLINE_TAG);
   boolean foundTag = false;
   while (javadocTagSection != null) {
     if (!isTagIgnored(javadocTagSection)) {
       foundTag = true;
       break;
     }
     javadocTagSection =
         JavadocUtils.getNextSibling(javadocTagSection, JavadocTokenTypes.JAVADOC_INLINE_TAG);
   }
   return foundTag;
 }