JniApi.hpp 943 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-04-07
  6. * Changed: 2023-04-08
  7. *
  8. * */
  9. #ifndef LS_STD_JNI_API_HPP
  10. #define LS_STD_JNI_API_HPP
  11. #include <ls-std/core/interface/IJniApi.hpp>
  12. #include <ls-std/os/dynamic-goal.hpp>
  13. namespace ls::std::core
  14. {
  15. class LS_STD_DYNAMIC_GOAL JniApi : public ls::std::core::interface_type::IJniApi
  16. {
  17. public:
  18. explicit JniApi(JNIEnv *_environment);
  19. ~JniApi() noexcept override;
  20. jbyte callByteMethod(jobject _javaObject, jmethodID _methodId) override;
  21. jint callIntMethod(jobject _javaObject, jmethodID _methodId) override;
  22. jclass findClass(const ::std::string &_classPath) override;
  23. jmethodID getMethodId(jclass _javaClass, const char *_methodIdentifier, const char *_methodSignature) override;
  24. private:
  25. JNIEnv *environment{};
  26. };
  27. }
  28. #endif