text: // AUTOGENERATED FILE - DO NOT MODIFY!
  // This file generated by Djinni from thread_dispatcher.djinni
  
  #include "ThreadDispatcher.hpp"  // my header
  #include "ExecutionContext.hpp"
  #include "Lock.hpp"
  #include "Marshal.hpp"
  
  namespace djinni_generated {
  
  ThreadDispatcher::ThreadDispatcher() : ::djinni::JniInterface<::ledger::core::api::ThreadDispatcher, ThreadDispatcher>() {}
  
  ThreadDispatcher::~ThreadDispatcher() = default;
  
  ThreadDispatcher::JavaProxy::JavaProxy(JniType j) : Handle(::djinni::jniGetThreadEnv(), j) { }
  
  ThreadDispatcher::JavaProxy::~JavaProxy() = default;
  
  std::shared_ptr<::ledger::core::api::ExecutionContext> ThreadDispatcher::JavaProxy::getSerialExecutionContext(const std::string & c_name) {
      auto jniEnv = ::djinni::jniGetThreadEnv();
      ::djinni::JniLocalScope jscope(jniEnv, 10);
      const auto& data = ::djinni::JniClass<::djinni_generated::ThreadDispatcher>::get();
      auto jret = jniEnv->CallObjectMethod(Handle::get().get(), data.method_getSerialExecutionContext,
                                           ::djinni::get(::djinni::String::fromCpp(jniEnv, c_name)));
      ::djinni::jniExceptionCheck(jniEnv);
      return ::djinni_generated::ExecutionContext::toCpp(jniEnv, jret);
  }
  std::shared_ptr<::ledger::core::api::ExecutionContext> ThreadDispatcher::JavaProxy::getThreadPoolExecutionContext(const std::string & c_name) {
      auto jniEnv = ::djinni::jniGetThreadEnv();
      ::djinni::JniLocalScope jscope(jniEnv, 10);
      const auto& data = ::djinni::JniClass<::djinni_generated::ThreadDispatcher>::get();
      auto jret = jniEnv->CallObjectMethod(Handle::get().get(), data.method_getThreadPoolExecutionContext,
                                           ::djinni::get(::djinni::String::fromCpp(jniEnv, c_name)));
      ::djinni::jniExceptionCheck(jniEnv);
      return ::djinni_generated::ExecutionContext::toCpp(jniEnv, jret);
  }
  std::shared_ptr<::ledger::core::api::ExecutionContext> ThreadDispatcher::JavaProxy::getMainExecutionContext() {
      auto jniEnv = ::djinni::jniGetThreadEnv();
      ::djinni::JniLocalScope jscope(jniEnv, 10);
      const auto& data = ::djinni::JniClass<::djinni_generated::ThreadDispatcher>::get();
      auto jret = jniEnv->CallObjectMethod(Handle::get().get(), data.method_getMainExecutionContext);
      ::djinni::jniExceptionCheck(jniEnv);
      return ::djinni_generated::ExecutionContext::toCpp(jniEnv, jret);
  }
  std::shared_ptr<::ledger::core::api::Lock> ThreadDispatcher::JavaProxy::newLock() {
      auto jniEnv = ::djinni::jniGetThreadEnv();
      ::djinni::JniLocalScope jscope(jniEnv, 10);
      const auto& data = ::djinni::JniClass<::djinni_generated::ThreadDispatcher>::get();
      auto jret = jniEnv->CallObjectMethod(Handle::get().get(), data.method_newLock);
      ::djinni::jniExceptionCheck(jniEnv);
      return ::djinni_generated::Lock::toCpp(jniEnv, jret);
  }
  
  }  // namespace djinni_generated
  