public static String classNameToSignature ( String name ) { int nameLength = name . length ( ) ; int colonPos = 1 + nameLength ; char [ ] buf = new char [ colonPos + 1 ] ; buf [ 0 ] = ' ' ; buf [ colonPos ] = ' ' ; name . getChars ( 0 , nameLength , buf , 1 ) ; for ( int i = 1 ; i != colonPos ; ++ i ) { if ( buf [ i ] == ' ' ) { buf [ i ] = ' ' ; } } return new String ( buf , 0 , colonPos + 1 ) ; }
Convert Java class name in dot notation into Lname - with - dots - replaced - by - slashes ; form suitable for use as JVM type signatures .