Package com.google.javascript.jscomp
Class LightweightMessageFormatter
- java.lang.Object
-
- com.google.javascript.jscomp.AbstractMessageFormatter
-
- com.google.javascript.jscomp.LightweightMessageFormatter
-
- All Implemented Interfaces:
MessageFormatter
public final class LightweightMessageFormatter extends AbstractMessageFormatter
Lightweight message formatter. The format of messages this formatter produces is very compact and to the point.
-
-
Constructor Summary
Constructors Constructor Description LightweightMessageFormatter(SourceExcerptProvider source)
LightweightMessageFormatter(SourceExcerptProvider source, SourceExcerptProvider.SourceExcerpt defaultFormat)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
formatError(JSError error)
Format an error.java.lang.String
formatWarning(JSError warning)
Format a warning.LightweightMessageFormatter
setIncludeLevel(boolean includeLevel)
LightweightMessageFormatter
setIncludeLocation(boolean includeLocation)
static LightweightMessageFormatter
withoutSource()
-
Methods inherited from class com.google.javascript.jscomp.AbstractMessageFormatter
getSource, maybeEmbolden, setColorize
-
-
-
-
Constructor Detail
-
LightweightMessageFormatter
public LightweightMessageFormatter(SourceExcerptProvider source)
-
LightweightMessageFormatter
public LightweightMessageFormatter(SourceExcerptProvider source, SourceExcerptProvider.SourceExcerpt defaultFormat)
-
-
Method Detail
-
withoutSource
public static LightweightMessageFormatter withoutSource()
-
setIncludeLocation
public LightweightMessageFormatter setIncludeLocation(boolean includeLocation)
-
setIncludeLevel
public LightweightMessageFormatter setIncludeLevel(boolean includeLevel)
-
formatError
public java.lang.String formatError(JSError error)
Description copied from interface:MessageFormatter
Format an error.
-
formatWarning
public java.lang.String formatWarning(JSError warning)
Description copied from interface:MessageFormatter
Format a warning.
-
-