public static String typedesc2ClassName ( final String desc ) { String className = desc ; switch ( desc . charAt ( 0 ) ) { case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : if ( desc . length ( ) != 1 ) { throw new IllegalArgumentException ( INVALID_BASE_TYPE + desc ) ; } break ; case ' ' : className = className . substring ( 1 , className . length ( ) - 1 ) ; break ; case ' ' : // uses less-known feature of class loaders for loading array types // using bytecode-like signatures. className = className . replace ( ' ' , ' ' ) ; break ; default : throw new IllegalArgumentException ( INVALID_TYPE_DESCRIPTION + desc ) ; } return className ; }
Converts bytecode - like description to java class name that can be loaded with a classloader . Uses less - known feature of class loaders for loading array classes .