public static final class CParseError.Builder extends Object
CParseError.
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 |
|---|---|---|
CParseError |
build() |
Builds a new
CParseError. |
CParseError.Builder |
from(CParseErrorType instance) |
Fill a builder with attribute values from the provided
CParseErrorType instance. |
CParseError.Builder |
setException(Exception exception) |
Initializes the optional value
exception to exception. |
CParseError.Builder |
setException(Optional<? extends Exception> exception) |
Initializes the optional value
exception to exception. |
CParseError.Builder |
setLexical(com.io7m.jlexing.core.LexicalPosition<URI> lexical) |
Initializes the value for the
lexical attribute. |
CParseError.Builder |
setMessage(String message) |
Initializes the value for the
message attribute. |
CParseError.Builder |
setSeverity(CParseErrorType.Severity severity) |
Initializes the value for the
severity attribute. |
public final CParseError.Builder from(CParseErrorType instance)
CParseErrorType 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 CParseError.Builder setLexical(com.io7m.jlexing.core.LexicalPosition<URI> lexical)
lexical attribute.lexical - The value for lexicalthis builder for use in a chained invocationpublic final CParseError.Builder setSeverity(CParseErrorType.Severity severity)
severity attribute.severity - The value for severitythis builder for use in a chained invocationpublic final CParseError.Builder setMessage(String message)
message attribute.message - The value for messagethis builder for use in a chained invocationpublic final CParseError.Builder setException(Exception exception)
exception to exception.exception - The value for exceptionthis builder for chained invocationpublic final CParseError.Builder setException(Optional<? extends Exception> exception)
exception to exception.exception - The value for exceptionthis builder for use in a chained invocationpublic CParseError build()
CParseError.IllegalStateException - if any required attributes are missingCopyright © 2018 <code@io7m.com> http://io7m.com