示例#1
0
		public void ChangeInterfaceName(int InterfaceNumber, string NewName)
		{
			// takes an index into the interface list
			// simple changes the name of a method/field in the constant pool
			// TODO: check this!

			InterfaceInfo IntInfo = FInterfaces.Item(InterfaceNumber);

			if (IntInfo.Name == NewName)
				return;

			ConstantUtf8Info NewTypeString = new ConstantUtf8Info(NewName);
			ushort NewTypeIndex = FConstantPool.Add(NewTypeString);

			// set the interface its new name
			ConstantClassInfo cci = (ConstantClassInfo)ConstantPool.Item(IntInfo.Value);
			cci.SetName(NewTypeIndex, FConstantPool);
		}