public static Class < ? > arrayElementType ( Class < ? > arrType ) { if ( null == arrType ) return null ; while ( arrType . isArray ( ) ) arrType = arrType . getComponentType ( ) ; return arrType ; }
Find array element type for class . Roll back component type until class is not an array anymore .