Class Comment

    • Field Summary

      • Fields inherited from class net.sourceforge.pmd.lang.ast.AbstractNode

        beginColumn, beginLine, childIndex, children, endColumn, endLine, firstToken, id, lastToken, parent
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Comment​(Token t)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String getFilteredComment()
      Filters the comment by removing the leading comment marker (like *) of each line as well as the start markers (//, /* or /** and the end markers (*/).
      String toString()  
      • Methods inherited from class net.sourceforge.pmd.lang.ast.AbstractNode

        appendElement, children, findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, findDescendantsOfType, getAsDocument, getBeginColumn, getBeginLine, getChild, getDataFlowNode, getEndColumn, getEndLine, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfAnyType, getFirstParentOfType, getImage, getIndexInParent, getNthParent, getNumChildren, getParent, getParentsOfType, getUserData, getUserMap, getXPathAttributesIterator, getXPathNodeName, hasDecendantOfAnyType, hasDescendantMatchingXPath, hasDescendantOfAnyType, hasDescendantOfType, hasImageEqualTo, isFindBoundary, isSingleLine, jjtAddChild, jjtClose, jjtGetChild, jjtGetChildIndex, jjtGetFirstToken, jjtGetId, jjtGetLastToken, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetChildIndex, jjtSetFirstToken, jjtSetLastToken, jjtSetParent, remove, removeChildAtIndex, setDataFlowNode, setImage, setUserData, testingOnlySetBeginColumn, testingOnlySetBeginLine, testingOnlySetEndColumn, testingOnlySetEndLine
    • Constructor Detail

      • Comment

        protected Comment​(Token t)
    • Method Detail

      • toString

        public String toString()
        Overrides:
        toString in class net.sourceforge.pmd.lang.ast.AbstractNode
      • getFilteredComment

        public String getFilteredComment()
        Filters the comment by removing the leading comment marker (like *) of each line as well as the start markers (//, /* or /** and the end markers (*/). Also leading and trailing empty lines are removed.
        Returns:
        the filtered comment