JniMethod.cpp 1.4 KB

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