Maximum number of parameters for the native methods

Hello,

I am currently designing my APIs and writing native methods. As the number of parameters is slowly growing, I was wondering if there is a limit for the number of parameters in my native method signature? If yes, what is the maximum allowed? (I am using SNI 1.4)
I started from there: Simple Native Interface (SNI) — MicroEJ Documentation. It was very helpful but I couldn’t find such limit information.

Thank you!

Best regards,

Alder

Hi Alder,

Yes, there is a limit for the number of parameters of natives methods.
The maximum number allowed is 15.

Regards,
Anselme G.

Thank you Anselme!

By the way, what would you advice to go around this limit? 15 already make a lot of arguments but if I wanted to go beyond this limit what would you do? I was thinking of grouping individual arguments in arrays, what do you think?

Best regards,

Alder