public class SimpleTextProvider extends Object implements TextProvider
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_MESSAGE_RESOURCE |
protected Locale |
locale |
protected String |
messageResource |
protected ResourceBundle |
resourceBundle |
copyright
Modifier and Type | Method and Description |
---|---|
static SimpleTextProvider |
create() |
static SimpleTextProvider |
create(Locale locale) |
static SimpleTextProvider |
create(Locale locale,
String messageResource) |
static SimpleTextProvider |
create(String messageResource) |
String |
getLocalizedString(String key) |
String |
getText(String key,
Object... args) |
String |
getTextOrNull(String key,
Object... args) |
public static final String DEFAULT_MESSAGE_RESOURCE
protected final Locale locale
protected final String messageResource
protected final ResourceBundle resourceBundle
public static SimpleTextProvider create()
public static SimpleTextProvider create(Locale locale)
public static SimpleTextProvider create(String messageResource)
public static SimpleTextProvider create(Locale locale, String messageResource)
public String getText(String key, Object... args)
getText
in interface TextProvider
public String getTextOrNull(String key, Object... args)
getTextOrNull
in interface TextProvider