mirror of
https://github.com/status-im/react-native.git
synced 2025-02-05 14:13:26 +00:00
remove extraneous method data
Reviewed By: achen1 Differential Revision: D4454618 fbshipit-source-id: f3e68fa6e00e27e2ff7a2f20500092e1eeeb10a1
This commit is contained in:
parent
f249a78df6
commit
3589dec58e
@ -9,7 +9,6 @@
|
||||
|
||||
package com.facebook.react.cxxbridge;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -38,10 +37,6 @@ import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_JAVA_BRIDGE;
|
||||
/* package */ class JavaModuleWrapper {
|
||||
@DoNotStrip
|
||||
public class MethodDescriptor {
|
||||
@DoNotStrip
|
||||
Method method;
|
||||
@DoNotStrip
|
||||
String signature;
|
||||
@DoNotStrip
|
||||
String name;
|
||||
@DoNotStrip
|
||||
@ -87,39 +82,6 @@ import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_JAVA_BRIDGE;
|
||||
return descs;
|
||||
}
|
||||
|
||||
@DoNotStrip
|
||||
public List<MethodDescriptor> newGetMethodDescriptors() {
|
||||
ArrayList<MethodDescriptor> descs = new ArrayList<>();
|
||||
|
||||
for (Map.Entry<String, BaseJavaModule.NativeMethod> entry :
|
||||
getModule().getMethods().entrySet()) {
|
||||
MethodDescriptor md = new MethodDescriptor();
|
||||
md.name = entry.getKey();
|
||||
md.type = entry.getValue().getType();
|
||||
|
||||
BaseJavaModule.JavaMethod method = (BaseJavaModule.JavaMethod) entry.getValue();
|
||||
md.method = method.getMethod();
|
||||
md.signature = method.getSignature();
|
||||
|
||||
descs.add(md);
|
||||
}
|
||||
|
||||
for (Map.Entry<String, BaseJavaModule.SyncNativeHook> entry :
|
||||
getModule().getSyncHooks().entrySet()) {
|
||||
MethodDescriptor md = new MethodDescriptor();
|
||||
md.name = entry.getKey();
|
||||
md.type = BaseJavaModule.METHOD_TYPE_SYNC;
|
||||
|
||||
BaseJavaModule.SyncJavaHook method = (BaseJavaModule.SyncJavaHook) entry.getValue();
|
||||
md.method = method.getMethod();
|
||||
md.signature = method.getSignature();
|
||||
|
||||
descs.add(md);
|
||||
}
|
||||
|
||||
return descs;
|
||||
}
|
||||
|
||||
// TODO mhorowitz: make this return NativeMap, which requires moving
|
||||
// NativeMap out of OnLoad.
|
||||
@DoNotStrip
|
||||
|
@ -50,12 +50,6 @@ struct JavaModuleWrapper : jni::JavaClass<JavaModuleWrapper> {
|
||||
getClass()->getMethod<jni::JList<JMethodDescriptor::javaobject>::javaobject()>("getMethodDescriptors");
|
||||
return getMethods(self());
|
||||
}
|
||||
|
||||
jni::local_ref<jni::JList<JMethodDescriptor::javaobject>::javaobject> newGetMethodDescriptors() {
|
||||
static auto getMethods =
|
||||
getClass()->getMethod<jni::JList<JMethodDescriptor::javaobject>::javaobject()>("newGetMethodDescriptors");
|
||||
return getMethods(self());
|
||||
}
|
||||
};
|
||||
|
||||
class ModuleRegistryHolder : public jni::HybridClass<ModuleRegistryHolder> {
|
||||
|
Loading…
x
Reference in New Issue
Block a user