| Modifier and Type | Class and Description |
|---|---|
| public static interface | MessageUtil.IMessageRenderer
parameterize rendering behavior for messages |
| private static class | MessageUtil.KindSelector
implementation for PICK_... |
| Modifier and Type | Field and Description |
|---|---|
| public static final IMessage | |
| public static final IMessage | |
| public static final IMessage | |
| public static final IMessage | |
| public static final IMessage | |
| public static final MessageUtil. | MESSAGE_ALL
render message without restriction, up to 10K, including throwable |
| public static final MessageUtil. | MESSAGE_LABEL
render message as label, i.e., less than 33 char |
| public static final MessageUtil. | MESSAGE_LABEL_NOLOC
render message as label, i.e., less than 33 char, with no source location |
| public static final MessageUtil. | MESSAGE_LINE
render message as line, i.e., less than 75 char, no internal line sep |
| public static final MessageUtil. | MESSAGE_LINE_FORCE_LOC
render message as line, i.e., less than 75 char, no internal line sep, trying to trim text as needed to end with a full source location |
| public static final MessageUtil. | MESSAGE_MOST
render message without restriction, except any Throwable thrown |
| public static final MessageUtil. | MESSAGE_SCALED
render message more verbosely if it is worse |
| public static final MessageUtil. | MESSAGE_SHORT
render message using toShortString(IMessage)" |
| public static final MessageUtil. | MESSAGE_TOSTRING
render message using its toString() or "((IMessage) null)" |
| public static final MessageUtil. | MESSAGE_WIDELINE
render message as wide line, i.e., less than 256 char, no internal line sep, except any Throwable thrown |
| public static final IMessageHandler | |
| public static final IMessageHandler | |
| public static final IMessageHandler | |
| public static final IMessageHandler | |
| public static final IMessageHandler | |
| public static final IMessageHandler | |
| public static final IMessageHandler | |
| public static final IMessageHandler | |
| public static final IMessageHandler | |
| public static final IMessageHandler | |
| public static final IMessageHandler | |
| public static final IMessageHandler | |
| public static final IMessageHandler | |
| public static final IMessage |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static boolean | |
| public static boolean | abort(IMessageHandler handler, String message, Throwable t)
create and handle exception message (ignored if handler is null) |
| public static IMessage | |
| public static IMessage | |
| public static String | |
| public static boolean | debug(IMessageHandler handler, String message)
create and handle debug message (ignored if handler is null) |
| public static IMessage | |
| public static boolean | error(IMessageHandler handler, String message)
create and handle error message (ignored if handler is null) |
| public static IMessage | Returns: ERROR_NOMESSAGE if message is empty or IMessage otherwise
|
| public static IMessage | |
| public static boolean | fail(IMessageHandler handler, String message)
create and handle fail message (ignored if handler is null) |
| public static boolean | fail(IMessageHandler handler, String message, Throwable thrown)
create and handle fail message (ignored if handler is null) |
| public static IMessage | |
| public static IMessage | |
| public static IMessage. | |
| public static List | Returns: unmodifiable list of IMessage complying with parameters
|
| public static List | getMessages(List<IMessage>
if null, return EMPTY_LIST messages, IMessage.if null, return messages kindExtract messages of type kind from the input list. |
| public static IMessage[] | Returns: unmodifiable list of specified IMessageSelect all messages in holder except those of the same kind (optionally or greater). |
| public static boolean | Returns: false if any sink.handleMessage(..) failedthe IMessageHandler sink for all messages in source sink, IMessageHolder the IMessageHolder source for all messages to handle source, boolean if true, stop on first failure fastFail)Handle all messages in the second handler using the first |
| public static boolean | Returns: false if any sink.handleMessage(..) failedthe IMessageHandler sink for all messages in source sink, IMessageHolder the IMessageHolder source for all messages to handle source, IMessage.the IMessage.Kind to select, if not null kind,if true, also accept greater kinds orGreater, boolean if true, stop on first failure fastFail)Handle messages in the second handler using the first |
| public static boolean | Returns: false if any sink.handleMessage(..) failedthe IMessageHandler sink for all messages in source sink, IMessage[] the IMessage[] messages to handle sources, boolean if true, stop on first failure fastFail)Handle messages in the sink. |
| public static boolean | Returns: false if any sink.handleMessage(..) failedthe IMessageHandler sink for all messages in source sink, IMessageHolder the IMessageHolder source for all messages to handle source, IMessage.the IMessage.Kind to reject, if not null kind,if true, also reject greater kinds orGreater, boolean if true, stop on first failure fastFail)Handle messages in the second handler using the first if they are NOT of this kind (optionally, or greater). |
| public static PrintStream | handlerPrintStream(final IMessageHandler
the IMessageHandler sink for the messages generated handler, final IMessage.the IMessage.Kind of message to create kind,the OuputStream for text not captured by the handler (if null, System.out used) overage, final String prefix)Factory for handler adapted to PrintStream XXX weak - only handles println(String) |
| public static boolean | info(IMessageHandler handler, String message)
create and handle info message (ignored if handler is null) |
| public static IMessage | |
| public static IMessageHandler | Returns: IMessageHandler selector that works to param specsthe IMessage.Kind required of the message kind,if true, also accept messages with greater kinds, as defined by IMessage.Kind.COMPARATOR orGreater, String the String text to require in the message - may be null or empty to accept any message with the specified kind. infix)Make an IMessageHandler that handles IMessage if they have the right kind (or greater) and contain some infix String. |
| public static int | Returns: int number of message of this kind (optionally or greater) in list
|
| public static void | print(PrintStream out, IMessageHolder messageHolder)
Print all message to the print stream, starting each on a new line |
| public static void | print(PrintStream out, IMessageHolder holder, String prefix)
Print all message to the print stream, starting each on a new line, with a prefix. |
| public static void | print(PrintStream out, IMessageHolder holder, String prefix, MessageUtil.
IMessageRender to render result - use MESSAGE_LINE if null rendererPrint all message to the print stream, starting each on a new line, with a prefix and using a renderer. |
| public static void | print(PrintStream
the PrintStream sink - return silently if null out, IMessageHolder the IMessageHolder with the messages to print holder, String the prefix for each line prefix, MessageUtil.IMessageRender to render result - use MESSAGE_ALL if null renderer,IMessageHandler to select messages to render - if null, do all non-null selector)Print all message to the print stream, starting each on a new line, with a prefix and using a renderer. |
| public static void | print(PrintStream out, IMessageHolder holder, String prefix, MessageUtil.
|
| public static void | printMessageCounts(PrintStream out, IMessageHolder messageHolder)
Print total counts message to the print stream, starting each on a new line |
| public static void | |
| public static String | Returns: String of the form "{(# {type}) }.." for message kinds, skipping 0
|
| public static String | Returns: "((IMessage) null)" if null or String rendering otherwise, including everything (esp. throwable stack trace)This renders IMessage as String, ignoring empty elements and eliding any thrown stack traces. |
| public static String | Returns: "((IMessage) null)" if null or String rendering otherwise, including everything (esp. throwable stack trace)This renders IMessage as String, ignoring empty elements and eliding any thrown. |
| public static String | Returns: "((IMessage) null)" or message per specrelative proportion to spend on message and/or exception message, relative to source location - if 0,
message is suppressed textScale, int relative proportion to spend on source location suppressed if 0 locScale, int the number of characters - forced to 32..10000 max)Render message in a line. |
| public static String | Returns: "((ISourceLocation) null)" if null or String rendering
{file:}line{:column}
Render ISourceLocation to String, ignoring empty elements (null or ISourceLocation.NO_FILE or ISourceLocation.NO_COLUMN (though implementations may return 0 from getColumn() when passed NO_COLUMN as input)). |
| public static String | |
| public static IMessage[] | visitMessages(IMessageHolder holder, IMessageHandler visitor, boolean accumulate, boolean abortOnFail)
Run visitor over the set of messages in holder, optionally accumulating those accepted by the visitor |
| public static IMessage[] | visitMessages(IMessage[] messages, IMessageHandler visitor, boolean accumulate, boolean abortOnFail)
Run visitor over the set of messages in holder, optionally accumulating those accepted by the visitor |
| public static IMessage[] | Returns: IMessage.RA_IMessage if collection is empty, if not accumulate, or if visitor accepted no IMessage, or IMessage[] of accepted messages otherwiseif null or empty, return IMessage.RA_IMessage messages, IMessageHandler run visitor.handleMessage(message) on each message - if null and messages not empty, IllegalArgumentException visitor, final boolean if true, then return accepted IMessage[] accumulate, final boolean if true and visitor returns false, stop visiting abortOnFail)Run visitor over a collection of messages, optionally accumulating those accepted by the visitor |
| public static boolean | warn(IMessageHandler handler, String message)
create and handle warn message (ignored if handler is null) |
| public static IMessage | Returns: WARNING_NOMESSAGE if message is empty or IMessage otherwise
|
| public static IMessage |