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

Method bindAttributes

valdi/src/valdi/android/ViewManager.cpp:179–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179void ViewManager::bindAttributes(const Valdi::StringBox& className, Valdi::AttributesBindingContext& binder) {
180 static auto kObjectClass = STRING_LITERAL("java.lang.Object");
181 if (className == kObjectClass) {
182 return;
183 }
184
185 auto wrapper = Valdi::makeShared<AttributesBindingContextWrapper>(*this, binder);
186 auto ptr = reinterpret_cast<int64_t>(Valdi::unsafeBridgeCast(wrapper.get()));
187
188 auto* jclass = getClassForName(className).javaClass.getClass();
189
190 _bindAttributesMethod.call(toObject(), jclass, ptr);
191}
192
193Valdi::NativeAnimator ViewManager::createAnimator(snap::valdi_core::AnimationType type,
194 const std::vector<double>& controlPoints,

Callers 2

bindAttributeMethod · 0.45

Calls 5

unsafeBridgeCastFunction · 0.85
toObjectFunction · 0.85
getMethod · 0.65
callMethod · 0.65
getClassMethod · 0.45

Tested by

no test coverage detected