| Interface | Description |
|---|---|
| MessageBundleProvider |
ServiceLoader implementation for this library |
| Class | Description |
|---|---|
| MessageBundleFactory |
Centralized access point for bundles using the
ServiceLoader API |
ServiceLoader support
In order to use the service loader support, you will need to implement
MessageBundleProvider, then
create a file named META-INF/services/com.github.fge.msgsimple.serviceloader.MessageBundleProvider
in your classpath, with the fully qualified class names. For instance:
com.mycompany.bundle.MyFirstBundle
com.mycompany.bundle.MySecondBundle
At run time, you will then be able to retrieve your bundles using:
final MessageBundle bundle
= MessageBundleFactory.getBundle(MyFirstBundle.class);
Copyright © 2013. All Rights Reserved.