Package com.github.javaparser
Class CommentsInserter
java.lang.Object
com.github.javaparser.CommentsInserter
Assigns comments to nodes of the AST.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
attributeLineCommentsOnSameLine
(TreeSet<Comment> commentsToAttribute, List<Node> children) private boolean
attributeLineCommentToNodeOrChild
(Node node, LineComment lineComment) private boolean
commentIsOnNextLine
(Node a, Comment c) private void
insertComments
(CompilationUnit cu, TreeSet<Comment> comments) Comments are attributed to the thing they comment and are removed from the comments.(package private) void
insertComments
(Node node, TreeSet<Comment> commentsToAttribute) This method try to attributes the nodes received to child of the node.private boolean
thereAreLinesBetween
(Node a, Node b)
-
Field Details
-
configuration
-
-
Constructor Details
-
CommentsInserter
CommentsInserter(ParserConfiguration configuration)
-
-
Method Details
-
insertComments
Comments are attributed to the thing they comment and are removed from the comments. -
insertComments
This method try to attributes the nodes received to child of the node. It returns the node that were not attributed. -
attributeLineCommentsOnSameLine
-
attributeLineCommentToNodeOrChild
-
thereAreLinesBetween
-
commentIsOnNextLine
-