MCPcopy Create free account
hub / github.com/Snapchat/Valdi / createViewFactory

Method createViewFactory

valdi/src/valdi/android/ViewManager.cpp:85–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85Valdi::Ref<Valdi::ViewFactory> ViewManager::createViewFactory(
86 const Valdi::StringBox& className, const Valdi::Ref<Valdi::BoundAttributes>& boundAttributes) {
87 auto* jClass = getClassForName(className).javaClass.getClass();
88 auto viewFactory = _createViewFactoryMethod.call(toObject(), jClass);
89 auto viewFactoryObject =
90 ValdiAndroid::GlobalRefJavaObjectBase(getEnv(), viewFactory.getUnsafeObject(), "ViewFactory");
91
92 return Valdi::makeShared<ValdiAndroid::AndroidViewFactory>(
93 std::move(viewFactoryObject), className, *this, boundAttributes, false);
94}
95
96void ViewManager::callAction(Valdi::ViewNodeTree* viewNodeTree,
97 const Valdi::StringBox& actionName,

Callers

nothing calls this directly

Calls 6

toObjectFunction · 0.85
getUnsafeObjectMethod · 0.80
callMethod · 0.65
getEnvFunction · 0.50
getClassMethod · 0.45

Tested by

no test coverage detected