public static String classNameToSignature(String name){
  int nameLength=name.length();
  int colonPos=1 + nameLength;
  char[] buf=new char[colonPos + 1];
  buf[0]='L';
  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);
}

public static String classNameToSignature ( String name ) { int nameLength = name . length ( ) ; int colonPos = 1 + nameLength ; char [ ] buf = new char [ colonPos + 1 ] ; buf [ 0 ] = 'L' ; 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 .
