* @return Format the formatter
* @throws IllegalArgumentException if not suitable formatter is found
*/
public static Format<?> getFormat(Class<?> clazz, String pattern, int precision) throws Exception {
if (clazz == byte.class || clazz == Byte.class) {
return pattern != null ? new BytePatternFormat(pattern) : new ByteFormat();
} else if (clazz == short.class || clazz == Short.class) {
return pattern != null ? new ShortPatternFormat(pattern) : new ShortFormat();
} else if (clazz == int.class || clazz == Integer.class) {
return pattern != null ? new IntegerPatternFormat(pattern) : new IntegerFormat();
} else if (clazz == long.class || clazz == Long.class) {