public class Datatypes
extends java.lang.Object
DatatypeRegistry
and FormatStringsRegistry
beans directly.Constructor and Description |
---|
Datatypes() |
Modifier and Type | Method and Description |
---|---|
static <T> Datatype<T> |
get(java.lang.Class<T> clazz)
Get Datatype instance by the corresponding Java class.
|
static Datatype |
get(java.lang.String name)
Get Datatype instance by its unique name
|
static FormatStrings |
getFormatStrings(java.util.Locale locale)
Returns localized format strings.
|
static FormatStrings |
getFormatStringsNN(java.util.Locale locale)
Returns localized format strings.
|
static java.util.Set<java.lang.String> |
getIds() |
static <T> Datatype<T> |
getNN(java.lang.Class<T> clazz)
Get Datatype instance by the corresponding Java class.
|
@Nullable public static FormatStrings getFormatStrings(java.util.Locale locale)
locale
- selected localeFormatStrings
object, or null if no formats are registered for the locale@Nonnull public static FormatStrings getFormatStringsNN(java.util.Locale locale)
locale
- selected localeFormatStrings
object. Throws exception if not found.@Nonnull public static Datatype get(java.lang.String name)
java.lang.IllegalArgumentException
- if no datatype with the given name found@Nullable public static <T> Datatype<T> get(java.lang.Class<T> clazz)
@Nonnull public static <T> Datatype<T> getNN(java.lang.Class<T> clazz)
java.lang.IllegalArgumentException
- if no datatype suitable for the given type foundpublic static java.util.Set<java.lang.String> getIds()