JniMethod.hpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-04-08
  6. * Changed: 2024-05-31
  7. *
  8. * */
  9. #ifndef LS_STD_JNI_METHOD_HPP
  10. #define LS_STD_JNI_METHOD_HPP
  11. #include <jni.h>
  12. #include <ls-std/core/definition.hpp>
  13. #include <ls-std/os/dynamic-goal.hpp>
  14. #include <string>
  15. #include <string_view>
  16. namespace ls::std::core::experimental
  17. {
  18. ls_std_class JniMethod
  19. {
  20. public:
  21. explicit JniMethod(const ::std::string &_methodIdentifier, const ::std::string &_methodSignature);
  22. ~JniMethod();
  23. [[nodiscard]] jmethodID getMethodId();
  24. [[nodiscard]] ::std::string getMethodIdentifier() const;
  25. [[nodiscard]] ::std::string getMethodSignature() const;
  26. void setMethodId(jmethodID _methodId);
  27. void setMethodIdentifier(::std::string_view _methodIdentifier);
  28. void setMethodSignature(::std::string_view _methodSignature);
  29. private:
  30. jmethodID methodId{};
  31. ::std::string methodIdentifier{};
  32. ::std::string methodSignature{};
  33. };
  34. }
  35. #endif