In my project i want to use a JNI-agent to intercept results of java-static-native methods.
My basic approach is, at binding time, to rebind all the static methods to my interceptor method. The interceptor method would accept a variadic number of arguments and, when called, would forward them to the according static function.
Is it an appropriate approach? Right now in my implementation i struggle to forward variadic arguments from interceptor function to the actual function...
Does anyone have an idea of a better approach for this? Or am I doing something in an overcomplicated way?