Class AbstractCommentRule

    • Constructor Detail

      • AbstractCommentRule

        public AbstractCommentRule()
    • Method Detail

      • tagsIndicesIn

        @Deprecated
        protected java.util.List<java.lang.Integer> tagsIndicesIn​(java.lang.String comments)
        Deprecated.
        This method is deprecated and will be removed with PMD 7.0.0. It is not very useful, since it doesn't extract the information in a useful way. You would still need check, which tags have been found, and with which data they might be accompanied. A more useful solution will be added around the AST node FormalComment, which contains as children JavadocElement nodes, which in turn provide access to the JavadocTag.
        Returns a list of indices of javadoc tag occurrences in the comment.

        Note: if the same tag occurs multiple times, only the last occurrence is returned.

        Parameters:
        comments - the complete comment text
        Returns:
        list of indices.
      • filteredCommentIn

        protected java.lang.String filteredCommentIn​(Comment comment)
      • assignCommentsToDeclarations

        protected void assignCommentsToDeclarations​(ASTCompilationUnit cUnit)
      • orderedCommentsAndDeclarations

        protected java.util.SortedMap<java.lang.Integer,​net.sourceforge.pmd.lang.ast.Node> orderedCommentsAndDeclarations​(ASTCompilationUnit cUnit)