Modifier and Type | Method and Description |
---|---|
static Format<?> |
getFormat(Class<?> clazz,
String locale,
DataField data)
Retrieves the format to use for the given type
|
static Format<?> |
getFormat(Class<?> clazz,
String locale,
KeyValuePairField data)
Retrieves the format to use for the given type
|
public static Format<?> getFormat(Class<?> clazz, String locale, DataField data) throws Exception
clazz
- represents the type of the format (String, Integer, Byte)locale
- optional locale for NumberFormat and DateFormat parsing.IllegalArgumentException
- if not suitable formatter is foundException
public static Format<?> getFormat(Class<?> clazz, String locale, KeyValuePairField data) throws Exception
clazz
- represents the type of the format (String, Integer, Byte)locale
- optional locale for NumberFormat and DateFormat parsing.IllegalArgumentException
- if not suitable formatter is found
TODO : Check if KeyValuePair could also use decimal/groupingSeparator/rounding for BigDecimalException
Apache Camel