@SuppressWarnings("unchcecked")
private static Format<?> doGetFormat(Class<?> clazz, String pattern, String locale, int precision, boolean impliedDecimalSeparator) throws Exception {
if (clazz == byte.class || clazz == Byte.class) {
return ObjectHelper.isNotEmpty(pattern)
? new BytePatternFormat(pattern, getLocale(locale))
: new ByteFormat();
} else if (clazz == short.class || clazz == Short.class) {
return ObjectHelper.isNotEmpty(pattern)
? new ShortPatternFormat(pattern, getLocale(locale))
: new ShortFormat();
} else if (clazz == int.class || clazz == Integer.class) {