Add definations for ReadableArray and WritableArray

Summary: In TurboModules, we need to call into WritableArray and ReadableArray interfaces, not their implementations. By adding these interfaces, we can invoke the corresponding Java classes directly.

Reviewed By: fkgozali

Differential Revision: D6981870

fbshipit-source-id: 12b12b204a7d38b24363452ab574d88b827c907f
This commit is contained in:
Ram N
2018-12-13 07:07:13 -08:00
committed by Facebook Github Bot
parent 1decf879f8
commit 96e4a72679
2 changed files with 8 additions and 0 deletions

View File

@@ -13,6 +13,10 @@
namespace facebook {
namespace react {
struct ReadableArray : jni::JavaClass<ReadableArray> {
static auto constexpr kJavaDescriptor = "Lcom/facebook/react/bridge/ReadableArray;";
};
class ReadableNativeArray : public jni::HybridClass<ReadableNativeArray, NativeArray> {
protected:
friend HybridBase;

View File

@@ -16,6 +16,10 @@ namespace react {
struct WritableNativeMap;
struct WritableArray : jni::JavaClass<WritableArray> {
static auto constexpr kJavaDescriptor = "Lcom/facebook/react/bridge/WritableArray;";
};
struct WritableNativeArray
: public jni::HybridClass<WritableNativeArray, ReadableNativeArray> {
static constexpr const char* kJavaDescriptor = "Lcom/facebook/react/bridge/WritableNativeArray;";