|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.github.fge.msgsimple.load.MessageBundles
public final class MessageBundles
Centralized access point for bundles
In order to register your bundle, you simply need to have an
implementation of MessageBundleLoader. The first time you call this
factory's getBundle(Class) with the class of this implementation,
it will create a cached instance of this provider and return the bundle.
Say your MessageBundleLoader implementation is called MyMessageBundle and is in package com.example.util, then, in your
code, this is as simple as:
import com.example.util.MyMessageBundle;
// In your class:
private static final MessageBundle BUNDLE
= MessageBundles.getBundle(MyMessageBundle.class);
This will automatically load the bundle for you.
| Method Summary | |
|---|---|
static MessageBundle |
getBundle(Class<? extends MessageBundleLoader> c)
Get a message bundle for a registered MessageBundleLoader
implementation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static MessageBundle getBundle(Class<? extends MessageBundleLoader> c)
MessageBundleLoader
implementation
c - the class of the implementation
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||