public static final class JSXLexerConfiguration.Builder
extends java.lang.Object
JSXLexerConfiguration.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
| Modifier and Type | Method | Description |
|---|---|---|
JSXLexerConfiguration |
build() |
Builds a new
JSXLexerConfiguration. |
JSXLexerConfiguration.Builder |
from(JSXLexerConfigurationType instance) |
Fill a builder with attribute values from the provided
JSXLexerConfigurationType instance. |
JSXLexerConfiguration.Builder |
setComments(java.util.EnumSet<JSXLexerComment> comments) |
Initializes the value for the
comments attribute. |
JSXLexerConfiguration.Builder |
setFile(java.nio.file.Path file) |
Initializes the optional value
file to file. |
JSXLexerConfiguration.Builder |
setFile(java.util.Optional<? extends java.nio.file.Path> file) |
Initializes the optional value
file to file. |
JSXLexerConfiguration.Builder |
setNewlinesInQuotedStrings(boolean newlinesInQuotedStrings) |
Initializes the value for the
newlinesInQuotedStrings attribute. |
JSXLexerConfiguration.Builder |
setSquareBrackets(boolean squareBrackets) |
Initializes the value for the
squareBrackets attribute. |
JSXLexerConfiguration.Builder |
setStartAtLine(int startAtLine) |
Initializes the value for the
startAtLine attribute. |
public final JSXLexerConfiguration.Builder from(JSXLexerConfigurationType instance)
JSXLexerConfigurationType instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final JSXLexerConfiguration.Builder setSquareBrackets(boolean squareBrackets)
squareBrackets attribute.
If not set, this attribute will have a default value as returned by the initializer of squareBrackets.
squareBrackets - The value for squareBracketsthis builder for use in a chained invocationpublic final JSXLexerConfiguration.Builder setNewlinesInQuotedStrings(boolean newlinesInQuotedStrings)
newlinesInQuotedStrings attribute.
If not set, this attribute will have a default value as returned by the initializer of newlinesInQuotedStrings.
newlinesInQuotedStrings - The value for newlinesInQuotedStringsthis builder for use in a chained invocationpublic final JSXLexerConfiguration.Builder setFile(java.nio.file.Path file)
file to file.file - The value for filethis builder for chained invocationpublic final JSXLexerConfiguration.Builder setFile(java.util.Optional<? extends java.nio.file.Path> file)
file to file.file - The value for filethis builder for use in a chained invocationpublic final JSXLexerConfiguration.Builder setComments(java.util.EnumSet<JSXLexerComment> comments)
comments attribute.
If not set, this attribute will have a default value as returned by the initializer of comments.
comments - The value for commentsthis builder for use in a chained invocationpublic final JSXLexerConfiguration.Builder setStartAtLine(int startAtLine)
startAtLine attribute.
If not set, this attribute will have a default value as returned by the initializer of startAtLine.
startAtLine - The value for startAtLinethis builder for use in a chained invocationpublic JSXLexerConfiguration build()
JSXLexerConfiguration.java.lang.IllegalStateException - if any required attributes are missingCopyright © 2017 <code@io7m.com> http://io7m.com