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() |
Comment |
setCommentedNode(Node commentedNode) |
Comment |
setContent(String content)
Sets the text of the comment.
|
accept, accept, addOrphanComment, clone, contains, equals, getAllContainedComments, getBegin, getChildrenNodes, getComment, getEnd, getNodesByType, getOrphanComments, getParentNode, getParentNodeOfType, getRange, getUserData, hasComment, hashCode, isPositionedAfter, isPositionedBefore, setAsParentNodeOf, setAsParentNodeOf, setBegin, setBlockComment, setComment, setEnd, setLineComment, setParentNode, setRange, setUserData, toString, toStringWithoutComments, tryAddImportToParentCompilationUnit
public Comment()
public Comment(String content)
public final String getContent()
public Comment setContent(String content)
content
- the text of the comment to setpublic boolean isLineComment()
public LineComment asLineComment()
public Node getCommentedNode()
public boolean isOrphan()
Copyright © 2007–2016. All rights reserved.