Class Comment
- java.lang.Object
-
- net.sourceforge.pmd.lang.ast.AbstractNode
-
- net.sourceforge.pmd.lang.java.ast.Comment
-
- All Implemented Interfaces:
net.sourceforge.pmd.lang.ast.Node
- Direct Known Subclasses:
FormalComment,MultiLineComment,SingleLineComment
public abstract class Comment extends net.sourceforge.pmd.lang.ast.AbstractNode
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetFilteredComment()Filters the comment by removing the leading comment marker (like*) of each line as well as the start markers (//,/*or/**and the end markers (*/).java.lang.StringtoString()-
Methods inherited from class net.sourceforge.pmd.lang.ast.AbstractNode
appendElement, findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, findDescendantsOfType, getAsDocument, getBeginColumn, getBeginLine, getDataFlowNode, getEndColumn, getEndLine, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfAnyType, getFirstParentOfType, getImage, getNthParent, getParentsOfType, getUserData, 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 java.lang.String toString()
- Overrides:
toStringin classnet.sourceforge.pmd.lang.ast.AbstractNode
-
getFilteredComment
public java.lang.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
-
-