public final class LightweightMessageFormatter extends AbstractMessageFormatter
Modifier and Type | Class and Description |
---|---|
(package private) static class |
LightweightMessageFormatter.LineNumberingFormatter
Formats a region by appending line numbers in front, e.g.
|
Modifier and Type | Field and Description |
---|---|
private SourceExcerptProvider.SourceExcerpt |
excerpt |
private static SourceExcerptProvider.ExcerptFormatter |
excerptFormatter |
Modifier | Constructor and Description |
---|---|
private |
LightweightMessageFormatter()
A constructor for when the client doesn't care about source information.
|
|
LightweightMessageFormatter(SourceExcerptProvider source) |
|
LightweightMessageFormatter(SourceExcerptProvider source,
SourceExcerptProvider.SourceExcerpt excerpt) |
Modifier and Type | Method and Description |
---|---|
private java.lang.String |
format(JSError error,
boolean warning) |
java.lang.String |
formatError(JSError error)
Format an error.
|
private static java.lang.String |
formatPosition(java.lang.String sourceName,
int lineNumber) |
java.lang.String |
formatWarning(JSError warning)
Format a warning.
|
(package private) static LightweightMessageFormatter |
withoutSource() |
getLevelName, getSource, maybeEmbolden, setColorize, termSupportsColor
private SourceExcerptProvider.SourceExcerpt excerpt
private static final SourceExcerptProvider.ExcerptFormatter excerptFormatter
private LightweightMessageFormatter()
public LightweightMessageFormatter(SourceExcerptProvider source)
public LightweightMessageFormatter(SourceExcerptProvider source, SourceExcerptProvider.SourceExcerpt excerpt)
static LightweightMessageFormatter withoutSource()
public java.lang.String formatError(JSError error)
MessageFormatter
public java.lang.String formatWarning(JSError warning)
MessageFormatter
private java.lang.String format(JSError error, boolean warning)
private static java.lang.String formatPosition(java.lang.String sourceName, int lineNumber)