BlockComment, LineComment, JavadocComment
| Access | Constructor and Description |
|---|---|
| public | |
| public | Comment(TokenRange tokenRange, String content)
This constructor is used by the parser and is considered private. |
| Modifier and Type | Method and Description |
|---|---|
| public BlockComment | |
| public JavadocComment | |
| public LineComment | |
| public Comment | |
| public Node | findRootNode()
Overrides com. |
| public Optional | |
| public String | |
| public CommentMetaModel | |
| public void | |
| public void | |
| public void | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public Node | setComment(final Comment
to be set comment)Overrides com. |
| public Comment | Returns: this, the Commentthe commentedNode, can be null commentedNode)Sets the commentedNode |
| public Comment | |
| public Optional | |
| public Optional | |
| public Optional |
| commentedNode | back to summary |
|---|---|
| private Node commentedNode
| |
| content | back to summary |
|---|---|
| private String content | |
| Comment | back to summary |
|---|---|
public Comment(String content)
| |
| Comment | back to summary |
|---|---|
| public Comment(TokenRange tokenRange, String content) This constructor is used by the parser and is considered private.
| |
| asBlockComment | back to summary |
|---|---|
public BlockComment asBlockComment()
| |
| asJavadocComment | back to summary |
|---|---|
public JavadocComment asJavadocComment()
| |
| asLineComment | back to summary |
|---|---|
public LineComment asLineComment()
| |
| clone | back to summary |
|---|---|
| public Comment clone() Overrides com. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| findRootNode | back to summary |
|---|---|
| public Node findRootNode() Overrides com. Doc from com. Finds the root node of this AST by finding the topmost parent.
| |
| getCommentedNode | back to summary |
|---|---|
| public Optional | |
| getContent | back to summary |
|---|---|
| public String getContent() Return the text of the comment.
| |
| getMetaModel | back to summary |
|---|---|
| public CommentMetaModel getMetaModel() Overrides com.
| |
| ifBlockComment | back to summary |
|---|---|
public void ifBlockComment(Consumer<BlockComment> action)
| |
| ifJavadocComment | back to summary |
|---|---|
public void ifJavadocComment(Consumer<JavadocComment> action)
| |
| ifLineComment | back to summary |
|---|---|
public void ifLineComment(Consumer<LineComment> action)
| |
| isBlockComment | back to summary |
|---|---|
public boolean isBlockComment()
| |
| isJavadocComment | back to summary |
|---|---|
public boolean isJavadocComment()
| |
| isLineComment | back to summary |
|---|---|
public boolean isLineComment()
| |
| isOrphan | back to summary |
|---|---|
| public boolean isOrphan() | |
| remove | back to summary |
|---|---|
| public boolean remove() Overrides com. Doc from com. Try to remove this node from the parent
| |
| remove | back to summary |
|---|---|
| public boolean remove(Node node) Overrides com.
| |
| replace | back to summary |
|---|---|
| public boolean replace(Node node, Node replacementNode) Overrides com.
| |
| setComment | back to summary |
|---|---|
| public Node setComment(final Comment comment) Overrides com. Doc from com. Use this to store additional information to this node. | |
| setCommentedNode | back to summary |
|---|---|
| public Comment setCommentedNode(Node commentedNode) Sets the commentedNode | |
| setContent | back to summary |
|---|---|
| public Comment setContent(final String content) Sets the text of the comment.
| |
| toBlockComment | back to summary |
|---|---|
public Optional
| |
| toJavadocComment | back to summary |
|---|---|
public Optional
| |
| toLineComment | back to summary |
|---|---|
public Optional
| |