public enum Messages extends Enum<Messages>
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
String |
getExceptionMessage(int code,
Object... args)
Gets an exception message.
|
IllegalArgumentException |
getIllegalArgumentException(int code,
Object... args)
Builds an
IllegalArgumentException from an exception message. |
String |
getMessage(String key,
Object... args)
Gets a message.
|
String |
getParseMessage(int code,
Object... args)
Gets a parser warning message.
|
String |
getValidationWarning(int code,
Object... args)
Gets a validation warning message.
|
static Messages |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Messages[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static Messages[] values()
for (Messages c : Messages.values()) System.out.println(c);
public static Messages valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic String getValidationWarning(int code, Object... args)
code
- the message codeargs
- the message argumentspublic String getParseMessage(int code, Object... args)
code
- the message codeargs
- the message argumentspublic String getExceptionMessage(int code, Object... args)
code
- the message codeargs
- the message argumentspublic IllegalArgumentException getIllegalArgumentException(int code, Object... args)
IllegalArgumentException
from an exception message.code
- the message codeargs
- the message argumentspublic String getMessage(String key, Object... args)
key
- the message keyargs
- the message argumentsCopyright © 2012–2023 Michael Angstadt. All rights reserved.