public class ForwardingDiagnosticFormatter<D extends Diagnostic<?>,F extends DiagnosticFormatter<D>> extends Object implements DiagnosticFormatter<D>
This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Modifier and Type | Class and Description |
---|---|
static class |
ForwardingDiagnosticFormatter.ForwardingConfiguration
A delegated formatter configuration delegates all configurations settings
to an underlying configuration object (aka the delegated configuration).
|
DiagnosticFormatter.Configuration, DiagnosticFormatter.PositionKind
Modifier and Type | Field and Description |
---|---|
protected ForwardingDiagnosticFormatter.ForwardingConfiguration |
configuration |
protected F |
formatter
The delegated formatter
|
Constructor and Description |
---|
ForwardingDiagnosticFormatter(F formatter) |
Modifier and Type | Method and Description |
---|---|
boolean |
displaySource(D diag)
Whether the source code output for this diagnostic is to be displayed.
|
String |
format(D diag,
Locale l)
Format the contents of a diagnostics.
|
String |
formatKind(D diag,
Locale l)
Controls the way in which a diagnostic kind is displayed.
|
String |
formatMessage(D diag,
Locale l)
Controls the way in which a diagnostic message is displayed.
|
String |
formatPosition(D diag,
DiagnosticFormatter.PositionKind pk,
Locale l)
Controls the way in which a diagnostic position is displayed.
|
String |
formatSource(D diag,
boolean fullname,
Locale l)
Controls the way in which a diagnostic source is displayed.
|
DiagnosticFormatter.Configuration |
getConfiguration()
Get a list of all the enabled verbosity options.
|
F |
getDelegatedFormatter()
Returns the underlying delegated formatter
|
protected F extends DiagnosticFormatter<D> formatter
protected ForwardingDiagnosticFormatter.ForwardingConfiguration configuration
public ForwardingDiagnosticFormatter(F formatter)
public F getDelegatedFormatter()
public DiagnosticFormatter.Configuration getConfiguration()
DiagnosticFormatter
getConfiguration
in interface DiagnosticFormatter<D extends Diagnostic<?>>
public boolean displaySource(D diag)
DiagnosticFormatter
displaySource
in interface DiagnosticFormatter<D extends Diagnostic<?>>
diag
- diagnostic to be formattedpublic String format(D diag, Locale l)
DiagnosticFormatter
format
in interface DiagnosticFormatter<D extends Diagnostic<?>>
diag
- the diagnostic to be formattedl
- locale object to be used for i18npublic String formatKind(D diag, Locale l)
DiagnosticFormatter
formatKind
in interface DiagnosticFormatter<D extends Diagnostic<?>>
diag
- diagnostic to be formattedl
- locale object to be used for i18npublic String formatMessage(D diag, Locale l)
DiagnosticFormatter
formatMessage
in interface DiagnosticFormatter<D extends Diagnostic<?>>
diag
- diagnostic to be formattedl
- locale object to be used for i18npublic String formatPosition(D diag, DiagnosticFormatter.PositionKind pk, Locale l)
DiagnosticFormatter
formatPosition
in interface DiagnosticFormatter<D extends Diagnostic<?>>
diag
- diagnostic to be formattedpk
- enum constant representing the position kindl
- locale object to be used for i18npublic String formatSource(D diag, boolean fullname, Locale l)
DiagnosticFormatter
formatSource
in interface DiagnosticFormatter<D extends Diagnostic<?>>
diag
- diagnostic to be formattedfullname
- whether the source fullname should be printedl
- locale object to be used for i18nCopyright © 2015. All rights reserved.