| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private static final ListResourceBundle |
| Access | Constructor and Description |
|---|---|
| public | LocalizedMessage(String key)
A LocalizedMessage can be instantiated with a key and formatted with arguments later in the style of MessageFormat. |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: A formatted message stringThe arguments that should be placed in the message arguments)Return a localized string corresponding to the key stored in this object, formatted with the provided arguments. |
| public String | Returns: A formatted message stringThe arguments that should be placed in the message arguments)Return a non-localized string corresponding to the key stored in this object, formatted with the provided arguments. |
| public static String | Returns: A formatted message stringThe key of the desired string in the security resource bundle key, Object... The arguments that should be placed in the message arguments)Return a localized string corresponding to the provided key, and formatted with the provided arguments. |
| public static String | Returns: A formatted message stringThe key of the desired string in resources key, Object... The arguments that should be placed in the message arguments)Return a non-localized string corresponding to the provided key, and formatted with the provided arguments. |
| key | back to summary |
|---|---|
| private final String key | |
| RESOURCES | back to summary |
|---|---|
| private static final ListResourceBundle RESOURCES | |
| LocalizedMessage | back to summary |
|---|---|
| public LocalizedMessage(String key) A LocalizedMessage can be instantiated with a key and formatted with arguments later in the style of MessageFormat. This organization allows the actual formatting to be avoided unless the resulting string is needed. | |
| formatLocalized | back to summary |
|---|---|
| public String formatLocalized(Object... arguments) Return a localized string corresponding to the key stored in this object, formatted with the provided arguments. This method should only be called when the VM is booted and all resources needed to obtain and format the localized message are loaded (or can be loaded). | |
| formatNonlocalized | back to summary |
|---|---|
| public String formatNonlocalized(Object... arguments) Return a non-localized string corresponding to the key stored in this object, formatted with the provided arguments. All strings are obtained from sun.security.util.resources, and the formatting only supports simple positional argument replacement (e.g. {1}). | |
| getLocalized | back to summary |
|---|---|
| public static String getLocalized(String key, Object... arguments) Return a localized string corresponding to the provided key, and formatted with the provided arguments. This method should only be called when the VM is booted and all resources needed to obtain and format the localized message are loaded (or can be loaded). | |
| getNonlocalized | back to summary |
|---|---|
| public static String getNonlocalized(String key, Object... arguments) Return a non-localized string corresponding to the provided key, and formatted with the provided arguments. All strings are obtained from sun.security.util.resources, and the formatting only supports simple positional argument replacement (e.g. {1}). | |