Package cz.tvrzna.jackie
Class CommonUtils
- java.lang.Object
-
- cz.tvrzna.jackie.CommonUtils
-
public class CommonUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringDATE_FORMAT_JSONprotected static StringDEFAULT_SEPARATORprotected static List<Class<?>>PRIMITIVE_CLASSESprotected static List<Class<?>>SIMPLE_CLASSES
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static <T> TconvertArrayToPrimitive(List<?> list, Class<?> clazz)Convert array to primitive.protected static <T> Object[]convertPrimitiveArrayToObjects(T array)protected static List<Field>getFields(Class<?> clazz)Gets the fields.
-
-
-
Field Detail
-
DATE_FORMAT_JSON
protected static final String DATE_FORMAT_JSON
- See Also:
- Constant Field Values
-
DEFAULT_SEPARATOR
protected static final String DEFAULT_SEPARATOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getFields
protected static List<Field> getFields(Class<?> clazz)
Gets the fields.- Parameters:
clazz- the clazz- Returns:
- the fields
-
convertArrayToPrimitive
protected static <T> T convertArrayToPrimitive(List<?> list, Class<?> clazz) throws Exception
Convert array to primitive.- Type Parameters:
T- the generic type- Parameters:
list- the listclazz- the clazz- Returns:
- the t
- Throws:
Exception- the exception
-
-