private static void checkArrayType ( Class clazz ) { if ( null == clazz ) { throw new IllegalArgumentException ( "clazz can not be null" ) ; } if ( ! clazz . isArray ( ) ) { throw new IllegalArgumentException ( clazz . getCanonicalName ( ) + " is not array type" ) ; } }
Check whether the type passed in is array type . If the type is not array type throw IllegalArgumentException .