Org.Mozilla.Classfile.ClassFileWriter.ClassNameToSignature C# (CSharp) Method

ClassNameToSignature() public static method

Convert Java class name in dot notation into "Lname-with-dots-replaced-by-slashes;" form suitable for use as JVM type signatures.
Convert Java class name in dot notation into "Lname-with-dots-replaced-by-slashes;" form suitable for use as JVM type signatures.
public static ClassNameToSignature ( string name ) : string
name string
return string
		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] = ';';
			Sharpen.Runtime.GetCharsForString(name, 0, nameLength, buf, 1);
			for (int i = 1; i != colonPos; ++i)
			{
				if (buf[i] == '.')
				{
					buf[i] = '/';
				}
			}
			return new string(buf, 0, colonPos + 1);
		}