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