[java] Rewrite method identifier method to handle more cases.
This commit is contained in:
Родитель
f6c41ef7bd
Коммит
101093aee0
|
@ -277,13 +277,19 @@ namespace Embeddinator.Generators
|
|||
return true;
|
||||
}
|
||||
|
||||
static Declaration GetRootAssociatedDecl(Declaration decl)
|
||||
{
|
||||
while (decl.AssociatedDeclaration != null)
|
||||
decl = decl.AssociatedDeclaration;
|
||||
|
||||
return decl;
|
||||
}
|
||||
|
||||
public static string GetMethodIdentifier(Method method)
|
||||
{
|
||||
var name = method.Name;
|
||||
|
||||
var @class = method.Namespace as Class;
|
||||
|
||||
var associated = method.AssociatedDeclaration ?? method;
|
||||
var associated = GetRootAssociatedDecl(method);
|
||||
if (associated.DefinitionOrder != 0)
|
||||
name += $"_{associated.DefinitionOrder}";
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче