code: public static String toSignature(String externalName)
     {
        if (externalName == null)
           return null;
  
        String ret = primitiveNameDescriptors.get(externalName);
        if (ret != null)
           return ret;
  
        ret = externalName.replace('.', '/');
        return (ret.charAt(0) == '[') ? ret : "L" + ret + ";";
     }
docs: Converts a JVM external name to a JVM signature name. An external name is
  that which is returned from {@link Class#getName()} A signature name is
  the name in class file format.
  <p>
  For example:
  <p>
  [java.lang.Object
  <p>
  becomes:
  <p>
  [Ljava/lang/Object;
  
  @param externalName
  @return