Package | Description |
---|---|
com.github.javaparser.ast | |
com.github.javaparser.ast.comments | |
com.github.javaparser.ast.nodeTypes | |
com.github.javaparser.printer |
Modifier and Type | Method and Description |
---|---|
List<Comment> |
CompilationUnit.getAllComments()
Return a list containing all comments declared in this compilation unit.
|
List<Comment> |
Node.getAllContainedComments()
This is the list of Comment which are contained in the Node either because
they are properly associated to one of its children or because they are floating
around inside the Node
|
Optional<Comment> |
Node.getComment()
This is a comment associated with this node.
|
List<Comment> |
CompilationUnit.getComments()
Deprecated.
getComments was a too generic name and it could be confused with getComment
or getAllContainedComments
Use
CompilationUnit.getAllComments() instead |
List<Comment> |
Node.getOrphanComments()
This is a list of Comment which are inside the node and are not associated
with any meaningful AST Node.
|
Modifier and Type | Method and Description |
---|---|
void |
Node.addOrphanComment(Comment comment) |
boolean |
Node.removeOrphanComment(Comment comment) |
Node |
Node.setComment(Comment comment)
Use this to store additional information to this node.
|
Modifier and Type | Class and Description |
---|---|
class |
BlockComment
AST node that represent block comments.
|
class |
JavadocComment
A Javadoc comment.
|
class |
LineComment
AST node that represent line comments.
|
Modifier and Type | Method and Description |
---|---|
Comment |
Comment.clone() |
Comment |
Comment.setCommentedNode(Node commentedNode)
Sets the commentedNode
|
Comment |
Comment.setContent(String content)
Sets the text of the comment.
|
Modifier and Type | Method and Description |
---|---|
TreeSet<Comment> |
CommentsCollection.getComments() |
Modifier and Type | Method and Description |
---|---|
void |
CommentsCollection.addComment(Comment comment) |
boolean |
CommentsCollection.contains(Comment comment) |
Node |
Comment.setComment(Comment comment) |
Constructor and Description |
---|
CommentsCollection(Collection<Comment> commentsToCopy) |
Modifier and Type | Method and Description |
---|---|
Optional<Comment> |
SwitchNode.getComment() |
Optional<Comment> |
NodeWithJavadoc.getComment() |
Modifier and Type | Method and Description |
---|---|
Node |
NodeWithJavadoc.setComment(Comment comment) |
Modifier and Type | Method and Description |
---|---|
protected void |
PrettyPrintVisitor.printComment(Optional<Comment> comment,
Void arg) |
Copyright © 2007–2020. All rights reserved.