public class Resources extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
Resources.BaseMessage
The message in the default locale.
|
static class |
Resources.ExInst<T extends Exception>
Sub-class of
Resources.Inst that can throw an exception without caused
by. |
static class |
Resources.ExInstWithCause<T extends Exception>
Sub-class of
Resources.Inst that can throw an exception. |
static class |
Resources.Inst
Resource instance.
|
static interface |
Resources.Property
Property of a resource.
|
static interface |
Resources.Resource
The name of the property in the resource file.
|
static class |
Resources.ShadowResourceBundle
ShadowResourceBundle is an abstract base class for
ResourceBundle classes which are backed by a properties file. |
static class |
Resources.Validation
Types of validation that can be performed on a resource.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
create(String base,
Class<T> clazz) |
static Locale |
getThreadLocale()
Returns the preferred locale of the current thread, or null if the
thread has not called
setThreadLocale(java.util.Locale). |
protected static Locale |
getThreadOrDefaultLocale()
Returns the preferred locale of the current thread, or
the default locale if the current thread has not called
setThreadLocale(java.util.Locale). |
static void |
setThreadLocale(Locale locale)
Sets the locale for the current thread.
|
static void |
validate(Object o)
Applies all validations to all resource methods in the given
resource object.
|
static void |
validate(Object o,
EnumSet<Resources.Validation> validations)
Applies the given validations to all resource methods in the given
resource object.
|
protected static Locale getThreadOrDefaultLocale()
setThreadLocale(java.util.Locale).public static void setThreadLocale(Locale locale)
locale - Localepublic static Locale getThreadLocale()
setThreadLocale(java.util.Locale).public static void validate(Object o)
public static void validate(Object o, EnumSet<Resources.Validation> validations)
Copyright © 2014–2015 Julian Hyde. All rights reserved.