| 241 | } |
| 242 | |
| 243 | Local<Object> ObjectManager::CreateJSWrapperHelper(jint javaObjectID, |
| 244 | const string& typeName, |
| 245 | jclass clazz) { |
| 246 | auto isolate = m_isolate; |
| 247 | |
| 248 | auto className = (clazz != nullptr) ? GetClassName(clazz) : typeName; |
| 249 | |
| 250 | auto node = MetadataNode::GetOrCreate(className); |
| 251 | |
| 252 | auto jsWrapper = node->CreateJSWrapper(isolate, this); |
| 253 | |
| 254 | if (!jsWrapper.IsEmpty()) { |
| 255 | JEnv env; |
| 256 | auto claz = env.FindClass(className); |
| 257 | Link(jsWrapper, javaObjectID, claz); |
| 258 | } |
| 259 | return jsWrapper; |
| 260 | } |
| 261 | |
| 262 | /* * |
| 263 | * Link the JavaScript object and it's java counterpart with an ID |
nothing calls this directly
no test coverage detected