public abstract class AbstractMessageFormatter extends java.lang.Object implements MessageFormatter
MessageFormatter
needing a SourceExcerptProvider
.Modifier and Type | Class and Description |
---|---|
private static class |
AbstractMessageFormatter.Color |
Modifier and Type | Field and Description |
---|---|
private boolean |
colorize |
private SourceExcerptProvider |
source |
private static java.util.Set<java.lang.String> |
SUPPORTED_COLOR_TERMINALS |
Constructor and Description |
---|
AbstractMessageFormatter(SourceExcerptProvider source) |
Modifier and Type | Method and Description |
---|---|
(package private) java.lang.String |
getLevelName(CheckLevel level) |
protected SourceExcerptProvider |
getSource()
Get the source excerpt provider.
|
private java.lang.String |
maybeColorize(java.lang.String text,
AbstractMessageFormatter.Color color) |
protected java.lang.String |
maybeEmbolden(java.lang.String text) |
void |
setColorize(boolean colorize) |
(package private) static boolean |
termSupportsColor(java.lang.String term) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
formatError, formatWarning
private final SourceExcerptProvider source
private boolean colorize
private static final java.util.Set<java.lang.String> SUPPORTED_COLOR_TERMINALS
public AbstractMessageFormatter(SourceExcerptProvider source)
public void setColorize(boolean colorize)
protected final SourceExcerptProvider getSource()
static boolean termSupportsColor(java.lang.String term)
java.lang.String getLevelName(CheckLevel level)
protected java.lang.String maybeEmbolden(java.lang.String text)
private java.lang.String maybeColorize(java.lang.String text, AbstractMessageFormatter.Color color)