/// <summary> /// Gets the name of the given method /// </summary> public override void ModifyMethodName(ImportJarLib.Model.NetMethodDefinition method, MethodRenamer renamer) { base.ModifyMethodName(method, renamer); switch (method.Name) { case "Format": renamer.RenameMethodOnly(method, "JavaFormat"); method.EditorBrowsableState = EditorBrowsableState.Advanced; break; case "Substring": renamer.Rename(method, "JavaSubstring"); method.EditorBrowsableState = EditorBrowsableState.Advanced; break; case "ToLowerCase": renamer.Rename(method, "ToLower"); break; case "Length": method.SetExplicitImplementation(method.Overrides.First(), method.Overrides.First().DeclaringType); break; case "CharAt": method.SetExplicitImplementation(method.Overrides.First(), method.Overrides.First().DeclaringType); break; case "ToUpperCase": renamer.Rename(method, "ToUpper"); break; } }
/// <summary> /// Gets the name of the given method /// </summary> public override void ModifyMethodName(ImportJarLib.Model.NetMethodDefinition method, MethodRenamer renamer) { base.ModifyMethodName(method, renamer); switch (method.Name) { case "Append": if (method.JavaDescriptor == "(Ljava/lang/CharSequence;II)Ljava/lang/StringBuilder;") { renamer.Rename(method, "JavaAppend"); method.EditorBrowsableState = EditorBrowsableState.Advanced; } break; case "Delete": if (method.JavaDescriptor == "(II)Ljava/lang/StringBuilder;") { renamer.Rename(method, "JavaDelete"); method.EditorBrowsableState = EditorBrowsableState.Advanced; } break; case "Insert": if (method.JavaDescriptor == "(ILjava/lang/CharSequence;II)Ljava/lang/StringBuilder;") { renamer.Rename(method, "JavaInsert"); method.EditorBrowsableState = EditorBrowsableState.Advanced; } break; case "Substring": if (method.JavaDescriptor == "(II)Ljava/lang/String;") { renamer.Rename(method, "JavaSubstring"); method.EditorBrowsableState = EditorBrowsableState.Advanced; } break; case "Length": method.SetExplicitImplementation(method.Overrides.First(), method.Overrides.First().DeclaringType); break; case "CharAt": method.SetExplicitImplementation(method.Overrides.First(), method.Overrides.First().DeclaringType); break; case "SetLength": renamer.RenameMethodOnly(method, "JavaSetLength"); method.EditorBrowsableState = EditorBrowsableState.Advanced; break; } }
/// <summary> /// Gets the name of the given method /// </summary> public override void ModifyMethodName(ImportJarLib.Model.NetMethodDefinition method, MethodRenamer renamer) { base.ModifyMethodName(method, renamer); switch (method.Name) { case "Format": renamer.RenameMethodOnly(method, "JavaFormat"); method.EditorBrowsableState = EditorBrowsableState.Advanced; break; case "Substring": renamer.Rename(method, "JavaSubstring"); method.EditorBrowsableState = EditorBrowsableState.Advanced; break; case "ToLowerCase": renamer.Rename(method, "ToLower"); break; case "ToUpperCase": renamer.Rename(method, "ToUpper"); break; } }