Reputation: 6687
I have a class named Fruits. Inside the class there is a interface named Sour. Inside the Interface I have a method GetItems();
public class Fruits
{
----------------
----------------
public interface Sour
{
public int GetItems();
}
}
How to get the signature of the GetItems() method?. I want to use this signature in JNI GetMethodID method.
Upvotes: 0
Views: 288
Reputation: 13924
You can't use JNI without a class implementing your Interface. Just use the signature of this implementing class.
Upvotes: 0
Reputation: 4245
Some class has to first implement that interface.
Once a class has imlpemented an interface then you should be able to get the methodID for the interface method, which is now a member of the class that implemented it.
Upvotes: 1