Class ParserConfiguration


  • public class ParserConfiguration
    extends Object
    The configuration that is used by the parser. Note that this can be changed even when reusing the same JavaParser instance. It will pick up the changes.
    • Constructor Detail

      • ParserConfiguration

        public ParserConfiguration()
    • Method Detail

      • isAttributeComments

        public boolean isAttributeComments()
      • setAttributeComments

        public ParserConfiguration setAttributeComments​(boolean attributeComments)
        Whether to run CommentsInserter, which will put the comments that were found in the source code into the comment and javadoc fields of the nodes it thinks they refer to.
      • isDoNotAssignCommentsPrecedingEmptyLines

        public boolean isDoNotAssignCommentsPrecedingEmptyLines()
      • setDoNotAssignCommentsPrecedingEmptyLines

        public ParserConfiguration setDoNotAssignCommentsPrecedingEmptyLines​(boolean doNotAssignCommentsPrecedingEmptyLines)
      • isDoNotConsiderAnnotationsAsNodeStartForCodeAttribution

        public boolean isDoNotConsiderAnnotationsAsNodeStartForCodeAttribution()
      • setDoNotConsiderAnnotationsAsNodeStartForCodeAttribution

        public ParserConfiguration setDoNotConsiderAnnotationsAsNodeStartForCodeAttribution​(boolean doNotConsiderAnnotationsAsNodeStartForCodeAttribution)
      • isStoreTokens

        public boolean isStoreTokens()
      • getTabSize

        public int getTabSize()
      • setTabSize

        public ParserConfiguration setTabSize​(int tabSize)
        When a TAB character is encountered during parsing, the column position will be increased by this value. By default it is 1.
      • getValidator

        public Validator getValidator()