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 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 (*/).StringtoString()-
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:
toStringin classnet.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
-
-