DefaultConfigurableSensibleUi.Builder
public static interface ConfigurableSensibleUi.Builder
ConfigurableSensibleUi
instances.Modifier and Type | Method | Description |
---|---|---|
ConfigurableSensibleUi.Builder |
autoFlushStderr(boolean autoFlush) |
Sets whether the standard error stream should be automatically flushed.
|
ConfigurableSensibleUi.Builder |
autoFlushStdout(boolean autoFlush) |
Sets whether the standard output stream should be automatically flushed.
|
ConfigurableSensibleUi |
build() |
Creates a new UI from this builder.
|
ConfigurableSensibleUi.Builder |
console(ProgramConsole console) |
Sets the console used for prompting the user.
|
ConfigurableSensibleUi.Builder |
debug(boolean debug) |
Sets the
debug level flag. |
ConfigurableSensibleUi.Builder |
debugPrefix(String debugPrefix) |
Sets the prefix for debug messages.
|
ConfigurableSensibleUi.Builder |
debugTo(StandardIo debugTo) |
Selects which of this builder's output streams debug messages should be
written to.
|
ConfigurableSensibleUi.Builder |
errorPrefix(String errorPrefix) |
Sets the prefix for error messages.
|
ConfigurableSensibleUi.Builder |
locale(Locale locale) |
Sets the locale to use for locale-sensitive operations.
|
ConfigurableSensibleUi.Builder |
notePrefix(String notePrefix) |
Sets the prefix for note messages.
|
ConfigurableSensibleUi.Builder |
noteTo(StandardIo noteTo) |
Selects which of this builder's output streams note messages should be
written to.
|
ConfigurableSensibleUi.Builder |
printStackTrace(boolean printStackTrace) |
Sets whether exception stack traces should be printed.
|
ConfigurableSensibleUi.Builder |
programName(String programName) |
Sets the name of the program.
|
ConfigurableSensibleUi.Builder |
quiet(boolean quiet) |
Sets the
quiet level flag. |
ConfigurableSensibleUi.Builder |
statusPrefix(String statusPrefix) |
Sets the prefix for status messages.
|
ConfigurableSensibleUi.Builder |
statusTo(StandardIo statusTo) |
Selects which of this builder's output streams status messages should be
written to.
|
ConfigurableSensibleUi.Builder |
stderr(Appendable stderr) |
Sets the standard error stream.
|
ConfigurableSensibleUi.Builder |
stdout(Appendable stdout) |
Sets the standard output stream.
|
ConfigurableSensibleUi.Builder |
useLocalizedExceptionMessage(boolean useLocalizedExceptionMessage) |
Sets whether to use localized or non-localized exception messages when
printing messages from exceptions.
|
ConfigurableSensibleUi.Builder |
verbose(boolean verbose) |
Sets the
verbose level flag. |
ConfigurableSensibleUi.Builder |
warnPrefix(String warnPrefix) |
Sets the prefix for warn messages.
|
ConfigurableSensibleUi.Builder programName(String programName)
programName
- the name of the program; may be null
; must
not be an empty stringIllegalArgumentException
- if programName
is an empty
stringConfigurableSensibleUi.Builder console(ProgramConsole console)
console
- the console; may be null
ConfigurableSensibleUi.Builder stdout(Appendable stdout)
stdout
- the standard output streamNullPointerException
- if stdout
is null
ConfigurableSensibleUi.Builder stderr(Appendable stderr)
stderr
- the standard error streamNullPointerException
- if stderr
is null
ConfigurableSensibleUi.Builder autoFlushStdout(boolean autoFlush)
if true
, methods of the built UI that write to the standard
output stream will flush the standard output stream after writing to it.
autoFlush
- whether to automatically flush the standard output
streamConfigurableSensibleUi.Builder autoFlushStderr(boolean autoFlush)
if true
, methods of the built UI that write to the standard
error stream will flush the standard error stream after writing to it.
autoFlush
- whether to automatically flush the standard error
streamConfigurableSensibleUi.Builder locale(Locale locale)
locale
- the localeNullPointerException
- if locale
is null
ConfigurableSensibleUi.Builder quiet(boolean quiet)
quiet
level flag.
If true
, status messages will not be printed.
quiet
- the quiet
level flagConfigurableSensibleUi.Builder verbose(boolean verbose)
verbose
level flag.
If true
, note messages will be printed.
verbose
- the verbose
level flagConfigurableSensibleUi.Builder debug(boolean debug)
debug
level flag.
If true
, debug messages will be printed.
debug
- the debug
level flagConfigurableSensibleUi.Builder printStackTrace(boolean printStackTrace)
printStackTrace
- whether to print stack tracesConfigurableSensibleUi.Builder useLocalizedExceptionMessage(boolean useLocalizedExceptionMessage)
useLocalizedExceptionMessage
- whether to use localized or
non-localized exception messagesConfigurableSensibleUi.Builder statusTo(StandardIo statusTo)
statusTo
- which output stream status messages should be written
to; must be StandardIo.OUTPUT
or
StandardIo.ERROR
IllegalArgumentException
- if statusTo
is not
StandardIo.OUTPUT
or StandardIo.ERROR
NullPointerException
- if statusTo
is null
ConfigurableSensibleUi.Builder noteTo(StandardIo noteTo)
noteTo
- which output stream note messages should be written to;
must be StandardIo.OUTPUT
or StandardIo.ERROR
IllegalArgumentException
- if noteTo
is not
StandardIo.OUTPUT
or StandardIo.ERROR
NullPointerException
- if noteTo
is null
ConfigurableSensibleUi.Builder debugTo(StandardIo debugTo)
debugTo
- which output stream debug messages should be written to;
must be StandardIo.OUTPUT
or StandardIo.ERROR
IllegalArgumentException
- if debugTo
is not
StandardIo.OUTPUT
or StandardIo.ERROR
NullPointerException
- if debugTo
is null
ConfigurableSensibleUi.Builder statusPrefix(String statusPrefix)
All status messages will be prefixed with the specified prefix.
statusPrefix
- the prefix for status messagesNullPointerException
- if statusPrefix
is null
ConfigurableSensibleUi.Builder notePrefix(String notePrefix)
All note messages will be prefixed with the specified prefix.
notePrefix
- the prefix for note messagesNullPointerException
- if notePrefix
is null
ConfigurableSensibleUi.Builder debugPrefix(String debugPrefix)
All debug messages will be prefixed with the specified prefix.
debugPrefix
- the prefix for debug messagesNullPointerException
- if debugPrefix
is null
ConfigurableSensibleUi.Builder warnPrefix(String warnPrefix)
All warn messages will be prefixed with the specified prefix.
warnPrefix
- the prefix for warn messagesNullPointerException
- if warnPrefix
is null
ConfigurableSensibleUi.Builder errorPrefix(String errorPrefix)
All error messages will be prefixed with the specified prefix.
errorPrefix
- the prefix for error messagesNullPointerException
- if errorPrefix
is null
ConfigurableSensibleUi build()