| Modifier and Type | Method and Description |
|---|---|
static Message |
create(String messageFormat,
Object... arguments)
Creates a new Message without a cause.
|
static Message |
create(Throwable cause,
List<Object> sources,
String messageFormat,
Object... arguments)
Creates a new Message with the given cause and a binding source stack.
|
static Message |
create(Throwable cause,
String messageFormat,
Object... arguments)
Creates a new Message with the given cause.
|
static String |
format(String messageFormat,
Object... arguments)
Calls
String.format(java.lang.String, java.lang.Object...) after converting the arguments using some standard guice formatting
for Key, Class and Member objects. |
static String |
formatMessages(String heading,
Collection<Message> errorMessages)
Returns the formatted message for an exception with the specified messages.
|
static Throwable |
getOnlyCause(Collection<Message> messages)
Returns the cause throwable if there is exactly one cause in
messages. |
public static String format(String messageFormat, Object... arguments)
String.format(java.lang.String, java.lang.Object...) after converting the arguments using some standard guice formatting
for Key, Class and Member objects.public static String formatMessages(String heading, Collection<Message> errorMessages)
public static Message create(String messageFormat, Object... arguments)
messageFormat - Format stringarguments - format string argumentspublic static Message create(Throwable cause, String messageFormat, Object... arguments)
cause - The exception that caused the errormessageFormat - Format stringarguments - format string argumentspublic static Message create(Throwable cause, List<Object> sources, String messageFormat, Object... arguments)
cause - The exception that caused the errorsources - The binding sources for the source stackmessageFormat - Format stringarguments - format string argumentspublic static Throwable getOnlyCause(Collection<Message> messages)
messages. If there are
zero or multiple messages with causes, null is returned.Copyright © 2006–2018 Google, Inc.. All rights reserved.