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 excerpt)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringformatError(JSError error)Format an error.java.lang.StringformatWarning(JSError warning)Format a warning.LightweightMessageFormattersetIncludeLevel(boolean includeLevel)LightweightMessageFormattersetIncludeLocation(boolean includeLocation)static LightweightMessageFormatterwithoutSource()-
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 excerpt)
-
-
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:MessageFormatterFormat an error.
-
formatWarning
public java.lang.String formatWarning(JSError warning)
Description copied from interface:MessageFormatterFormat a warning.
-
-