JniMethod.hpp 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-04-08
  6. * Changed: 2023-04-10
  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. namespace ls::std::core::experimental
  15. {
  16. class LS_STD_DYNAMIC_GOAL JniMethod
  17. {
  18. public:
  19. explicit JniMethod(const ::std::string &_methodIdentifier, const ::std::string &_methodSignature);
  20. ~JniMethod();
  21. [[nodiscard]] jmethodID getMethodId();
  22. [[nodiscard]] ::std::string getMethodIdentifier();
  23. [[nodiscard]] ::std::string getMethodSignature();
  24. void setMethodId(jmethodID _methodId);
  25. void setMethodIdentifier(const ::std::string &_methodIdentifier);
  26. void setMethodSignature(const ::std::string &_methodSignature);
  27. private:
  28. jmethodID methodId{};
  29. ::std::string methodIdentifier{};
  30. ::std::string methodSignature{};
  31. };
  32. }
  33. #endif