Package org.nuiton.i18n.init
Class ClassPathI18nInitializer
java.lang.Object
org.nuiton.i18n.init.I18nInitializer
org.nuiton.i18n.init.ClassPathI18nInitializer
Implementation of a
I18nInitializer using all i18n resources (from
artifacts) discovered in classpath.
Will scan all classpath.
This class requires an URLClassLoader, otherwise an exception will be thrown.
Note: No order can be predicted with this implementation on bundles.- Since:
- 1.1
- Author:
- Tony Chemit - chemit@codelutin.com
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected URL[]protected ClassLoaderclass loader to use (optional)Fields inherited from class org.nuiton.i18n.init.I18nInitializer
encoding, messageFormatter, missingKeyReturnNull -
Constructor Summary
ConstructorsConstructorDescriptionClassPathI18nInitializer(ClassLoader loader) ClassPathI18nInitializer(ClassLoader loader, URL[] extraURLs) -
Method Summary
Methods inherited from class org.nuiton.i18n.init.I18nInitializer
getEncoding, getMessageFormatter, isMissingKeyReturnNull, resolvBundles, setEncoding, setMessageFormatter, setMissingKeyReturnNull
-
Field Details
-
loader
class loader to use (optional) -
extraURLs
-
-
Constructor Details
-
ClassPathI18nInitializer
public ClassPathI18nInitializer() -
ClassPathI18nInitializer
-
ClassPathI18nInitializer
-
-
Method Details
-
resolvURLs
- Throws:
Exception
-
resolvBundles
Description copied from class:I18nInitializerResolv the bundles.- Specified by:
resolvBundlesin classI18nInitializer- Returns:
- the bundles detected
- Throws:
Exception- if any pb while getting bundles
-
getExtraURLs
-
getLoader
-