Class CommentParser


  • public class CommentParser
    extends java.lang.Object
    Contains methods for extracting Comment in various positions within and around Nodes
    • Method Detail

      • getBeginningOfBlockComment

        public java.util.Optional<Comment> getBeginningOfBlockComment​(Node<?> node,
                                                                      java.lang.String prefix)
      • getEndOfBlockComments

        public java.util.List<Comment> getEndOfBlockComments​(Node<?> node,
                                                             java.lang.String blockSuffix)
      • getTrailingComment

        public java.util.Optional<Comment> getTrailingComment​(Node<?> node)
      • getLeadingComments

        public java.util.List<Comment> getLeadingComments​(Node<?> node)
      • getCommentsAfterDescription

        public java.util.List<Comment> getCommentsAfterDescription​(Node<?> node)
      • getCommentOnFirstLineOfDocument

        public java.util.Optional<Comment> getCommentOnFirstLineOfDocument​(Document node)
      • getCommentsAfterAllDefinitions

        public java.util.List<Comment> getCommentsAfterAllDefinitions​(Document node)
      • getCommentOnChannel

        protected java.util.List<Comment> getCommentOnChannel​(java.util.List<org.antlr.v4.runtime.Token> refChannel,
                                                              java.util.function.Predicate<org.antlr.v4.runtime.Token> shouldIncludePredicate)