public abstract class Comment extends Node
BlockComment
,
LineComment
,
JavadocComment
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION
Modifier and Type | Method and Description |
---|---|
LineComment |
asLineComment() |
Optional<Node> |
getCommentedNode() |
String |
getContent()
Return the text of the comment.
|
boolean |
isLineComment() |
boolean |
isOrphan() |
Comment |
setCommentedNode(Node commentedNode) |
Comment |
setContent(String content)
Sets the text of the comment.
|
accept, accept, addOrphanComment, clone, containsWithin, equals, getAllContainedComments, getBackwardsCompatibleChildrenNodes, getBegin, getChildrenNodes, getComment, getEnd, getNodesByType, getOrphanComments, getParentNode, getParentNodeOfType, getRange, getUserData, hashCode, isPositionedAfter, isPositionedBefore, remove, setAsParentNodeOf, setAsParentNodeOf, setAsParentNodeOf, setBegin, setBlockComment, setComment, setEnd, setLineComment, setParentNode, setRange, setUserData, toString, toStringWithoutComments, tryAddImportToParentCompilationUnit
public final String getContent()
public Comment setContent(String content)
content
- the text of the comment to setpublic boolean isLineComment()
public LineComment asLineComment()
public boolean isOrphan()
Copyright © 2007–2016. All rights reserved.