JniMethod.hpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Co-Author: Claude Sonnet 4.6 (LLM)
  4. * Company: Lynar Studios
  5. * E-Mail: webmaster@lynarstudios.com
  6. * Created: 2023-04-08
  7. * Changed: 2026-06-23
  8. *
  9. * */
  10. #ifndef LS_STD_JNI_METHOD_HPP
  11. #define LS_STD_JNI_METHOD_HPP
  12. #include <jni.h>
  13. #include <ls-std/os/dynamic-goal.hpp>
  14. #include <string>
  15. #include <string_view>
  16. /*
  17. * @doc: class(name: 'JniMethod', package: 'core')
  18. * @doc: core.JniMethod.description('This class represents a class method within Java Native Interface (JNI) context.')
  19. * */
  20. namespace ls::standard::core::experimental
  21. {
  22. class LS_STD_DYNAMIC_GOAL JniMethod
  23. {
  24. public:
  25. explicit JniMethod(const ::std::string &_methodIdentifier, const ::std::string &_methodSignature);
  26. ~JniMethod();
  27. [[nodiscard]] jmethodID getMethodId();
  28. [[nodiscard]] ::std::string getMethodIdentifier() const;
  29. [[nodiscard]] ::std::string getMethodSignature() const;
  30. void setMethodId(jmethodID _methodId);
  31. void setMethodIdentifier(::std::string_view _methodIdentifier);
  32. void setMethodSignature(::std::string_view _methodSignature);
  33. private:
  34. jmethodID methodId{};
  35. ::std::string methodIdentifier{};
  36. ::std::string methodSignature{};
  37. };
  38. }
  39. #endif