1
0
mirror of https://github.com/twiglet/cs2j.git synced 2025-01-18 13:15:17 +01:00

rename Equals -> equals, GetHashCode -> hashCode

This commit is contained in:
Kevin Glynn 2011-04-18 18:03:32 +02:00
parent 03cfff361a
commit a611047b13

View File

@ -787,11 +787,21 @@ namespace Twiglet.CS2J.Translator.TypeRep
else { else {
methStr.Append("${this:16}."); methStr.Append("${this:16}.");
} }
// special for ToString -> tostring // special for ToString -> toString
// special for Equals -> equals
// special for GetHashCode -> hashCode
if (Name == "ToString" && Params.Count == 0) if (Name == "ToString" && Params.Count == 0)
{ {
methStr.Append("toString"); methStr.Append("toString");
} }
else if (Name == "Equals" && Params.Count == 1)
{
methStr.Append("equals");
}
else if (Name == "GetHashCode" && Params.Count == 0)
{
methStr.Append("hashCode");
}
else else
{ {
methStr.Append(Name); methStr.Append(Name);