JniMethod.hpp 1.0 KB

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