public static String determineQualifiedName ( String className ) { String readableClassName = StringUtils . removeWhitespace ( className ) ; if ( readableClassName == null ) { throw new IllegalArgumentException ( "readableClassName must not be null." ) ; } else if ( readableClassName . endsWith ( "[]" ) ) { StringBuilder classNameBuffer = new StringBuilder ( ) ; while ( readableClassName . endsWith ( "[]" ) ) { readableClassName = readableClassName . substring ( 0 , readableClassName . length ( ) - 2 ) ; classNameBuffer . append ( "[" ) ; } String abbreviation = PRIMITIVE_MAPPING . get ( readableClassName ) ; if ( abbreviation == null ) { classNameBuffer . append ( "L" ) . append ( readableClassName ) . append ( ";" ) ; } else { classNameBuffer . append ( abbreviation ) ; } readableClassName = classNameBuffer . toString ( ) ; } return readableClassName ; }
Given a readable class name determine the JVM Qualified Name