remove extraneous method data

Reviewed By: achen1

Differential Revision: D4454618

fbshipit-source-id: f3e68fa6e00e27e2ff7a2f20500092e1eeeb10a1
This commit is contained in:
Aaron Chiu
2017-01-24 16:06:56 -08:00
committed by Facebook Github Bot
parent f249a78df6
commit 3589dec58e
2 changed files with 0 additions and 44 deletions

View File

@@ -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