public static final class SMFParseError.Builder extends Object
SMFParseError.
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 and Description |
|---|---|
SMFParseError |
build()
Builds a new
SMFParseError. |
SMFParseError.Builder |
from(SMFErrorType instance)
Fill a builder with attribute values from the provided
com.io7m.smfj.core.SMFErrorType instance. |
SMFParseError.Builder |
from(SMFParseErrorType instance)
Fill a builder with attribute values from the provided
com.io7m.smfj.parser.api.SMFParseErrorType instance. |
SMFParseError.Builder |
setException(Exception exception)
Initializes the optional value
exception to exception. |
SMFParseError.Builder |
setException(Optional<? extends Exception> exception)
Initializes the optional value
exception to exception. |
SMFParseError.Builder |
setLexical(com.io7m.jlexing.core.LexicalPosition<URI> lexical)
Initializes the value for the
lexical attribute. |
SMFParseError.Builder |
setMessage(String message)
Initializes the value for the
message attribute. |
public final SMFParseError.Builder from(SMFParseErrorType instance)
com.io7m.smfj.parser.api.SMFParseErrorType instance.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final SMFParseError.Builder from(SMFErrorType instance)
com.io7m.smfj.core.SMFErrorType instance.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final SMFParseError.Builder setLexical(com.io7m.jlexing.core.LexicalPosition<URI> lexical)
lexical attribute.lexical - The value for lexicalthis builder for use in a chained invocationpublic final SMFParseError.Builder setMessage(String message)
message attribute.message - The value for messagethis builder for use in a chained invocationpublic final SMFParseError.Builder setException(Exception exception)
exception to exception.exception - The value for exceptionthis builder for chained invocationpublic final SMFParseError.Builder setException(Optional<? extends Exception> exception)
exception to exception.exception - The value for exceptionthis builder for use in a chained invocationpublic SMFParseError build()
SMFParseError.IllegalStateException - if any required attributes are missingCopyright © 2017 <code@io7m.com> http://io7m.com