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

Method setMethod

valdi/src/valdi/android/JavaInterfaceClassDelegate.cpp:69–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69void JavaInterfaceClassDelegate::setMethod(
70 size_t index, const AnyJavaMethod& method, jobject javaMethod, bool isOptional, bool isPropertyLike) {
71 Valdi::InlineContainerAllocator<JavaInterfaceClassDelegate, JavaInterfaceClassDelegateMethod> allocator;
72 auto& entry = allocator.getContainerStartPtr(this)[index];
73 entry.method = method;
74 if (isOptional && !isPropertyLike) {
75 entry.javaMethodRef = IndirectJavaGlobalRef::make(javaMethod, "Optional Java Method");
76 } else {
77 entry.javaMethodRef = IndirectJavaGlobalRef();
78 }
79 entry.isOptional = isOptional;
80 entry.isPropertyLike = isPropertyLike;
81}
82
83Valdi::Ref<Valdi::ValueTypedProxyObject> JavaInterfaceClassDelegate::newProxy(
84 const JavaValue& object,

Callers 1

Calls 2

getContainerStartPtrMethod · 0.45

Tested by

no test coverage detected