JniMethod.cpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. #include <ls-std/core/evaluator/EmptyStringArgumentEvaluator.hpp>
  11. #include <ls-std/core/jni/JniMethod.hpp>
  12. using ls::standard::core::EmptyStringArgumentEvaluator;
  13. using ls::standard::core::experimental::JniMethod;
  14. using std::string;
  15. using std::string_view;
  16. JniMethod::JniMethod(const string &_methodIdentifier, const string &_methodSignature) : methodIdentifier(_methodIdentifier), methodSignature(_methodSignature)
  17. {
  18. EmptyStringArgumentEvaluator{_methodIdentifier, "no method identifier has been provided!"}.evaluate();
  19. EmptyStringArgumentEvaluator{_methodSignature, "no method signature has been provided!"}.evaluate();
  20. }
  21. JniMethod::~JniMethod() = default;
  22. jmethodID JniMethod::getMethodId()
  23. {
  24. return this->methodId;
  25. }
  26. string JniMethod::getMethodIdentifier() const
  27. {
  28. return this->methodIdentifier;
  29. }
  30. string JniMethod::getMethodSignature() const
  31. {
  32. return this->methodSignature;
  33. }
  34. void JniMethod::setMethodId(jmethodID _methodId)
  35. {
  36. this->methodId = _methodId;
  37. }
  38. void JniMethod::setMethodIdentifier(string_view _methodIdentifier)
  39. {
  40. this->methodIdentifier = _methodIdentifier;
  41. }
  42. void JniMethod::setMethodSignature(string_view _methodSignature)
  43. {
  44. this->methodSignature = _methodSignature;
  45. }