question: static void appendArrayType ( StringBuilder sb , Class < ? > obj ) { if ( ! obj . isArray ( ) ) { sb . append ( obj . getName ( ) ) ; return ; } int dimensions = 1 ; Class simplified = obj . getComponentType ( ) ; obj = simplified ; while ( simplified . isArray ( ) ) { obj = simplified ; dimensions ++ ; } sb . append ( obj . getName ( ) ) ; switch ( dimensions ) { case 1 : sb . append ( "[]" ) ; break ; case 2 : sb . append ( "[][]" ) ; break ; case 3 : sb . append ( "[][][]" ) ; break ; default : for ( int i = 0 ; i < dimensions ; i ++ ) { sb . append ( "[]" ) ; } } }
target:  Appends the specified class name to the buffer. The class may represent a simple type, a reference type or an array type.