public class ParserConfiguration extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ParserConfiguration.LanguageLevel |
Constructor and Description |
---|
ParserConfiguration() |
Modifier and Type | Method and Description |
---|---|
ParserConfiguration.LanguageLevel |
getLanguageLevel() |
List<ParseResult.PostProcessor> |
getPostProcessors() |
Optional<SymbolResolver> |
getSymbolResolver()
Retrieve the SymbolResolver to be used while parsing, if any.
|
int |
getTabSize() |
Optional<Validator> |
getValidator()
Deprecated.
use getLanguageLevel
|
boolean |
isAttributeComments() |
boolean |
isDoNotAssignCommentsPrecedingEmptyLines() |
boolean |
isDoNotConsiderAnnotationsAsNodeStartForCodeAttribution()
Deprecated.
this setting has been renamed to ignoreAnnotationsWhenAttributingComments
|
boolean |
isIgnoreAnnotationsWhenAttributingComments() |
boolean |
isLexicalPreservationEnabled() |
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)
Deprecated.
this setting has been renamed to ignoreAnnotationsWhenAttributingComments
|
ParserConfiguration |
setIgnoreAnnotationsWhenAttributingComments(boolean ignoreAnnotationsWhenAttributingComments) |
ParserConfiguration |
setLanguageLevel(ParserConfiguration.LanguageLevel languageLevel) |
ParserConfiguration |
setLexicalPreservationEnabled(boolean lexicalPreservationEnabled)
Disabled by default.
|
ParserConfiguration |
setStoreTokens(boolean storeTokens) |
ParserConfiguration |
setSymbolResolver(SymbolResolver symbolResolver)
Set the SymbolResolver to be injected while parsing.
|
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)
Deprecated.
use setLanguageLevel, or getPostProcessors if you use a custom validator.
|
public boolean isAttributeComments()
public ParserConfiguration setAttributeComments(boolean attributeComments)
public boolean isDoNotAssignCommentsPrecedingEmptyLines()
public ParserConfiguration setDoNotAssignCommentsPrecedingEmptyLines(boolean doNotAssignCommentsPrecedingEmptyLines)
@Deprecated public boolean isDoNotConsiderAnnotationsAsNodeStartForCodeAttribution()
@Deprecated public ParserConfiguration setDoNotConsiderAnnotationsAsNodeStartForCodeAttribution(boolean doNotConsiderAnnotationsAsNodeStartForCodeAttribution)
public boolean isIgnoreAnnotationsWhenAttributingComments()
public ParserConfiguration setIgnoreAnnotationsWhenAttributingComments(boolean ignoreAnnotationsWhenAttributingComments)
public ParserConfiguration setStoreTokens(boolean storeTokens)
public boolean isStoreTokens()
public int getTabSize()
public ParserConfiguration setTabSize(int tabSize)
@Deprecated public Optional<Validator> getValidator()
@Deprecated public ParserConfiguration setValidator(Validator validator)
public ParserConfiguration setLexicalPreservationEnabled(boolean lexicalPreservationEnabled)
public boolean isLexicalPreservationEnabled()
public Optional<SymbolResolver> getSymbolResolver()
public ParserConfiguration setSymbolResolver(SymbolResolver symbolResolver)
public List<ParseResult.PostProcessor> getPostProcessors()
public ParserConfiguration setLanguageLevel(ParserConfiguration.LanguageLevel languageLevel)
public ParserConfiguration.LanguageLevel getLanguageLevel()
Copyright © 2007–2018. All rights reserved.