public static boolean isPrimitiveArray ( Class < ? > clazz ) { Preconditions . checkNotNull ( clazz , "Class must not be null" ) ; return ( clazz . isArray ( ) && clazz . getComponentType ( ) . isPrimitive ( ) ) ; }
Check if the given class represents an array of primitives i . e . boolean byte char short int long float or double .