public static Object getPrimitiveValueArray ( Object value ) { if ( value == null ) return null ; Class < ? > javaType = value . getClass ( ) ; if ( javaType . isArray ( ) ) { int length = Array . getLength ( value ) ; Object destArr = Array . newInstance ( getPrimitiveType ( javaType . getComponentType ( ) ) , length ) ; for ( int i = 0 ; i < length ; i ++ ) { Object srcObj = Array . get ( value , i ) ; Array . set ( destArr , i , getPrimitiveValueArray ( srcObj ) ) ; } return destArr ; } return value ; }
Converts an n - dimensional array of wrapper types to primitive types