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

Function javaResultFromPlatformResult

valdi_core/src/valdi_core/jni/JavaUtils.cpp:703–718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

701 return javaObjectFromValdiObject(object, false);
702}
703
704JavaObject javaObjectFromValdiObject(const Valdi::SharedValdiObject& object, bool wrapIfNeeded) {
705 return typedJavaObjectFromValdiObject<JavaObject>(object, wrapIfNeeded);
706}
707
708Valdi::Ref<Valdi::RefCountable> wrappedCppPtrFromNativeHandle(int64_t nativeHandle) {
709 auto* wrappedValue = reinterpret_cast<Valdi::Value*>(nativeHandle);
710 if (wrappedValue == nullptr) {
711 return nullptr;
712 }
713
714 return wrappedValue->getUnsafeTypedRefPointer<Valdi::RefCountable>();
715}
716
717Valdi::SharedValdiObject valdiObjectFromJavaObject(const JavaObject& javaObject, const char* tag) {
718 if (javaObject.isNull()) {
719 return nullptr;
720 }
721

Callers 1

fromCppMethod · 0.85

Calls 8

toJavaObjectFunction · 0.85
JavaObjectClass · 0.70
valueMethod · 0.65
callMethod · 0.65
getMessageMethod · 0.65
errorMethod · 0.65
isNullOrUndefinedMethod · 0.45
getClassMethod · 0.45

Tested by

no test coverage detected