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 |
---|---|
Charset |
getCharacterEncoding() |
ParserConfiguration.LanguageLevel |
getLanguageLevel() |
List<ParseResult.PostProcessor> |
getPostProcessors() |
List<Providers.PreProcessor> |
getPreProcessors() |
Optional<SymbolResolver> |
getSymbolResolver()
Retrieve the SymbolResolver to be used while parsing, if any.
|
int |
getTabSize() |
boolean |
isAttributeComments() |
boolean |
isDetectOriginalLineSeparator() |
boolean |
isDoNotAssignCommentsPrecedingEmptyLines() |
boolean |
isIgnoreAnnotationsWhenAttributingComments() |
boolean |
isLexicalPreservationEnabled() |
boolean |
isPreprocessUnicodeEscapes() |
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 |
setCharacterEncoding(Charset characterEncoding)
The character encoding used for reading input from files and streams.
|
ParserConfiguration |
setDetectOriginalLineSeparator(boolean detectOriginalLineSeparator) |
ParserConfiguration |
setDoNotAssignCommentsPrecedingEmptyLines(boolean doNotAssignCommentsPrecedingEmptyLines) |
ParserConfiguration |
setIgnoreAnnotationsWhenAttributingComments(boolean ignoreAnnotationsWhenAttributingComments) |
ParserConfiguration |
setLanguageLevel(ParserConfiguration.LanguageLevel languageLevel) |
ParserConfiguration |
setLexicalPreservationEnabled(boolean lexicalPreservationEnabled)
Disabled by default.
|
ParserConfiguration |
setPreprocessUnicodeEscapes(boolean preprocessUnicodeEscapes)
When set to true, unicode escape handling is done by preprocessing the whole input,
meaning that all unicode escapes are turned into unicode characters before parsing.
|
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.
|
public boolean isAttributeComments()
public ParserConfiguration setAttributeComments(boolean attributeComments)
public boolean isDoNotAssignCommentsPrecedingEmptyLines()
public ParserConfiguration setDoNotAssignCommentsPrecedingEmptyLines(boolean doNotAssignCommentsPrecedingEmptyLines)
public boolean isIgnoreAnnotationsWhenAttributingComments()
public ParserConfiguration setIgnoreAnnotationsWhenAttributingComments(boolean ignoreAnnotationsWhenAttributingComments)
public ParserConfiguration setStoreTokens(boolean storeTokens)
public boolean isStoreTokens()
public int getTabSize()
public ParserConfiguration setTabSize(int tabSize)
public ParserConfiguration setLexicalPreservationEnabled(boolean lexicalPreservationEnabled)
public boolean isLexicalPreservationEnabled()
public Optional<SymbolResolver> getSymbolResolver()
public ParserConfiguration setSymbolResolver(SymbolResolver symbolResolver)
public List<Providers.PreProcessor> getPreProcessors()
public List<ParseResult.PostProcessor> getPostProcessors()
public ParserConfiguration setLanguageLevel(ParserConfiguration.LanguageLevel languageLevel)
public ParserConfiguration.LanguageLevel getLanguageLevel()
public ParserConfiguration setPreprocessUnicodeEscapes(boolean preprocessUnicodeEscapes)
public boolean isPreprocessUnicodeEscapes()
public ParserConfiguration setDetectOriginalLineSeparator(boolean detectOriginalLineSeparator)
public boolean isDetectOriginalLineSeparator()
public Charset getCharacterEncoding()
public ParserConfiguration setCharacterEncoding(Charset characterEncoding)
Copyright © 2007–2020. All rights reserved.