Is it possible to use JNA to check that the signature of the Java interface is consistent with the signature of the associated C funtions?
For example suppose that I have the following C interface for my C code:
__declspec(dllexport) void receive(bool boolValue, int intValue);
And the associated Java interface:
public interface MyLibrary extends Library {
public void receive(int intValue, bool boolValue);
}
If I load the library, I will have no problem, but of course I will have an error if calling the receive method of the interface because the signature of the method is not aligned with the signature of the corresponding function.
Is there any way to know that the alignment is off before calling the method? I though about using:
Function function = NativeLibrary.getFunction("receive");
But after that it seems that I have no way to know anything about the signature of the function.