Add dynamic type for javascript arguments passed over bridge with unkown type

Reviewed By: astreet

Differential Revision: D4380882

fbshipit-source-id: f1b9fb9cf727d003dcc2264626e75fc300a47dee
This commit is contained in:
Emil Sjolander
2017-01-08 04:28:14 -08:00
committed by Facebook Github Bot
parent 3b5f04b002
commit e3c8d80b3c
14 changed files with 217 additions and 3 deletions
@@ -11,11 +11,9 @@ package com.facebook.react.bridge;
import com.facebook.jni.HybridData;
import com.facebook.proguard.annotations.DoNotStrip;
import com.facebook.soloader.SoLoader;
import java.util.HashMap;
/**
* Implementation of a read-only map in native memory. This will generally be constructed and filled
* in native code so you shouldn't construct one yourself.
@@ -49,6 +47,11 @@ public class ReadableNativeMap extends NativeMap implements ReadableMap {
@Override
public native ReadableType getType(String name);
@Override
public Dynamic getDynamic(String name) {
return new DynamicFromMap(this, name);
}
@Override
public ReadableMapKeySetIterator keySetIterator() {
return new ReadableNativeMapKeySetIterator(this);