diff --git a/jnigen/lib/src/elements/elements.dart b/jnigen/lib/src/elements/elements.dart index e48124a0..6925edfb 100644 --- a/jnigen/lib/src/elements/elements.dart +++ b/jnigen/lib/src/elements/elements.dart @@ -485,7 +485,12 @@ class Method extends ClassMember implements Element { TypeUsage? asyncReturnType; @JsonKey(includeFromJson: false) - late String javaSig = '$name$descriptor'; + late String javaSig = _javaSig(); + + String _javaSig() { + final paramNames = params.map((p) => p.type.name).join(', '); + return '${returnType.name} $name($paramNames)'; + } bool get isCtor => name == '';