Class LocalizableMessage
- java.lang.Object
-
- org.glassfish.jersey.internal.l10n.LocalizableMessage
-
- All Implemented Interfaces:
Localizable
public final class LocalizableMessage extends Object implements Localizable
- Author:
- WS Development Team
-
-
Field Summary
-
Fields inherited from interface org.glassfish.jersey.internal.l10n.Localizable
NOT_LOCALIZABLE
-
-
Constructor Summary
Constructors Constructor Description LocalizableMessage(String bundlename, String key, Object... args)Deprecated.LocalizableMessage(String bundlename, LocalizableMessageFactory.ResourceBundleSupplier rbSupplier, String key, Object... args)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]getArguments()Returns the arguments for message formatting.StringgetKey()Gets the key in the resource bundle.ResourceBundlegetResourceBundle(Locale locale)Get the resource bundle of the given localization.StringgetResourceBundleName()Get the name of the localization messages resource bundle.
-
-
-
Constructor Detail
-
LocalizableMessage
@Deprecated public LocalizableMessage(String bundlename, String key, Object... args)
Deprecated.
-
LocalizableMessage
public LocalizableMessage(String bundlename, LocalizableMessageFactory.ResourceBundleSupplier rbSupplier, String key, Object... args)
-
-
Method Detail
-
getKey
public String getKey()
Description copied from interface:LocalizableGets the key in the resource bundle.- Specified by:
getKeyin interfaceLocalizable- Returns:
- if this method returns
Localizable.NOT_LOCALIZABLE, that means the message is not localizable, and the first item ofLocalizable.getArguments()array holds aString.
-
getArguments
public Object[] getArguments()
Description copied from interface:LocalizableReturns the arguments for message formatting.- Specified by:
getArgumentsin interfaceLocalizable- Returns:
- can be an array of length 0 but never be
null.
-
getResourceBundleName
public String getResourceBundleName()
Description copied from interface:LocalizableGet the name of the localization messages resource bundle.- Specified by:
getResourceBundleNamein interfaceLocalizable- Returns:
- the localization messages resource bundle name.
-
getResourceBundle
public ResourceBundle getResourceBundle(Locale locale)
Description copied from interface:LocalizableGet the resource bundle of the given localization.- Specified by:
getResourceBundlein interfaceLocalizable- Parameters:
locale- the givenLocale- Returns:
- the localization messages resource bundle for given locale.
-
-