javax.jdo.spi.I18NHelper - JDO class
javax.jdo.spi
Class I18NHelper
java.lang.Object javax.jdo.spi.I18NHelper
I18NHelper msg = I18NHelper.getInstance("javax.jdo.Bundle");
This call uses the class loader that loaded the I18NHelper class to find the specified Bundle. The class provides two overloaded getInstance methods allowing to specify a different class loader: getInstance(Class cls)
looks for a bundle called "Bundle.properties" located in the package of the specified class object and getInstance(String bundleName,ClassLoader loader)
uses the specified class loader to find the bundle.
Subsequently, instance methods can be used to format message strings using the text from the bundle, as in
throw new JDOFatalInternalException (msg.msg("ERR_NoMetadata", cls.getName()));
- Since:
- JDO 1.0.1
null
. - Parameters:
-
cls
- the class object from which to load the resource bundle
- Returns:
- the helper instance bound to the bundle
- Since:
- JDO 1.0.1
- Parameters:
-
bundleName
- the name of the bundle
- Returns:
- the helper instance bound to the bundle
- Since:
- JDO 1.0.1
null
. - Parameters:
-
bundleName
- the name of the bundle -
loader
- the class loader from which to load the resource bundle
- Returns:
- the helper instance bound to the bundle
- Since:
- JDO 1.0.1
- Returns:
- the associated resource bundle
- Since:
- JDO 1.1
- Parameters:
-
messageKey
- the message key
- Returns:
- the resolved message text
- Since:
- JDO 1.0.1
- Parameters:
-
messageKey
- the message key -
arg
- the argument
- Returns:
- the resolved message text
- Since:
- JDO 1.0.1
- Parameters:
-
messageKey
- the message key -
arg1
- the first argument
- Returns:
- the resolved message text
- Since:
- JDO 1.0.1
- Parameters:
-
messageKey
- the message key -
arg
- the argument
- Returns:
- the resolved message text
- Since:
- JDO 1.0.1
- Parameters:
-
messageKey
- the message key -
args
- the array of arguments
- Returns:
- the resolved message text
- Since:
- JDO 1.0.1
- Parameters:
-
messageKey
- the message key -
arg1
- the first argument -
arg2
- the second argument
- Returns:
- the resolved message text
- Since:
- JDO 1.0.1
- Parameters:
-
messageKey
- the message key -
arg1
- the first argument -
arg2
- the second argument -
arg3
- the third argument
- Returns:
- the resolved message text
- Since:
- JDO 1.0.1