@ThreadRestricted public class BundleFormatter extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
BundleFormatter.GProvider
A provider of a general (G) bundle formatter.
|
Modifier and Type | Field and Description |
---|---|
static String |
ASSUMED_PACKAGE_PREFIX
For properties that are keyed by Java classname (typical case), this is the name
prefix that is assumed, by convention.
|
protected ResourceBundle |
bundle |
protected Formatter |
formatter
The formatter for appending printf-style format strings.
|
Constructor and Description |
---|
BundleFormatter(ResourceBundle bundle)
Constructs a BundleFormatter.
|
Modifier and Type | Method and Description |
---|---|
ResourceBundle |
bundle()
The local resource bundle.
|
String |
format(String format,
Object... args)
Returns a printf-style formatted string, generated using
Formatter.
|
String |
l(String key,
Object... args)
Returns a localized string.
|
protected BundleFormatter |
lappend(String key,
Object... args)
Appends a localized string to the buffer.
|
Locale |
locale()
The locale for this bundle formatter.
|
protected StringBuilder |
stringBuilder()
The character buffer.
|
protected final ResourceBundle bundle
public static final String ASSUMED_PACKAGE_PREFIX
public BundleFormatter(ResourceBundle bundle)
bundle
- the bundle, per bundle()public final ResourceBundle bundle()
public final String format(String format, Object... args)
protected BundleFormatter lappend(String key, Object... args)
protected final StringBuilder stringBuilder()