Package com.github.javaparser
Class ParserConfiguration
- java.lang.Object
-
- com.github.javaparser.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 Summary
Constructors Constructor Description ParserConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getTabSize()
Validator
getValidator()
boolean
isAttributeComments()
boolean
isDoNotAssignCommentsPrecedingEmptyLines()
boolean
isDoNotConsiderAnnotationsAsNodeStartForCodeAttribution()
boolean
isStoreTokens()
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.ParserConfiguration
setDoNotAssignCommentsPrecedingEmptyLines(boolean doNotAssignCommentsPrecedingEmptyLines)
ParserConfiguration
setDoNotConsiderAnnotationsAsNodeStartForCodeAttribution(boolean doNotConsiderAnnotationsAsNodeStartForCodeAttribution)
ParserConfiguration
setStoreTokens(boolean storeTokens)
ParserConfiguration
setTabSize(int tabSize)
When a TAB character is encountered during parsing, the column position will be increased by this value.ParserConfiguration
setValidator(Validator validator)
The validator to run directly after parsing.
-
-
-
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)
-
setStoreTokens
public ParserConfiguration setStoreTokens(boolean storeTokens)
-
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()
-
setValidator
public ParserConfiguration setValidator(Validator validator)
The validator to run directly after parsing. By default it isJava1_0Validator
-
-