#pragma once #include #include #include #include #include namespace jni { template < class TheTag, class > class StaticMethod; template < class TheTag, class R, class... Args > class StaticMethod< TheTag, R (Args...) > { private: jmethodID& method; public: using TagType = TheTag; using MethodType = R (Args...); using ReturnType = R; StaticMethod(JNIEnv& env, const Class& clazz, const char* name) : method(GetStaticMethodID(env, *clazz, name, TypeSignature()())) {} operator jmethodID&() const { return method; } }; }