Java 类com.facebook.react.bridge.JSCJavaScriptExecutor 实例源码

项目:ReactNativeSignatureExample    文件:ReactTestHelper.java   
@Override
public CatalystInstance build() {
  return new CatalystInstanceImpl.Builder()
    .setReactQueueConfigurationSpec(ReactQueueConfigurationSpec.createDefault())
    .setJSExecutor(new JSCJavaScriptExecutor(new WritableNativeMap()))
    .setRegistry(mNativeModuleRegistryBuilder.build())
    .setJSModulesConfig(mJSModulesConfigBuilder.build())
    .setJSBundleLoader(JSBundleLoader.createFileLoader(
                         mContext,
                         "assets://AndroidTestBundle.js"))
    .setNativeModuleCallExceptionHandler(
      new NativeModuleCallExceptionHandler() {
          @Override
          public void handleException(Exception e) {
            throw new RuntimeException(e);
          }
      })
    .build();
}
项目:react-native-ibeacon-android    文件:ReactTestHelper.java   
@Override
public CatalystInstance build() {
  return new CatalystInstanceImpl.Builder()
    .setReactQueueConfigurationSpec(ReactQueueConfigurationSpec.createDefault())
    .setJSExecutor(new JSCJavaScriptExecutor(new WritableNativeMap()))
    .setRegistry(mNativeModuleRegistryBuilder.build())
    .setJSModulesConfig(mJSModulesConfigBuilder.build())
    .setJSBundleLoader(JSBundleLoader.createFileLoader(
                         mContext,
                         "assets://AndroidTestBundle.js"))
    .setNativeModuleCallExceptionHandler(
      new NativeModuleCallExceptionHandler() {
          @Override
          public void handleException(Exception e) {
            throw new RuntimeException(e);
          }
      })
    .build();
}
项目:react-native-box-loaders    文件:ReactTestHelper.java   
@Override
public CatalystInstance build() {
  return new CatalystInstanceImpl.Builder()
    .setReactQueueConfigurationSpec(ReactQueueConfigurationSpec.createDefault())
    .setJSExecutor(new JSCJavaScriptExecutor(new WritableNativeMap()))
    .setRegistry(mNativeModuleRegistryBuilder.build())
    .setJSModulesConfig(mJSModulesConfigBuilder.build())
    .setJSBundleLoader(JSBundleLoader.createFileLoader(
                         mContext,
                         "assets://AndroidTestBundle.js"))
    .setNativeModuleCallExceptionHandler(
      new NativeModuleCallExceptionHandler() {
          @Override
          public void handleException(Exception e) {
            throw new RuntimeException(e);
          }
      })
    .build();
}
项目:ReactNativeSignatureExample    文件:ReactInstanceManagerImpl.java   
private void onJSBundleLoadedFromServer() {
  recreateReactContextInBackground(
      new JSCJavaScriptExecutor.Factory(),
      JSBundleLoader.createCachedBundleFromNetworkLoader(
          mDevSupportManager.getSourceUrl(),
          mDevSupportManager.getDownloadedJSBundleFile()));
}
项目:react-native-ibeacon-android    文件:ReactInstanceManagerImpl.java   
private void onJSBundleLoadedFromServer() {
  recreateReactContextInBackground(
      new JSCJavaScriptExecutor.Factory(),
      JSBundleLoader.createCachedBundleFromNetworkLoader(
          mDevSupportManager.getSourceUrl(),
          mDevSupportManager.getDownloadedJSBundleFile()));
}
项目:react-native-box-loaders    文件:ReactInstanceManagerImpl.java   
private void onJSBundleLoadedFromServer() {
  recreateReactContextInBackground(
      new JSCJavaScriptExecutor.Factory(),
      JSBundleLoader.createCachedBundleFromNetworkLoader(
          mDevSupportManager.getSourceUrl(),
          mDevSupportManager.getDownloadedJSBundleFile()));
}
项目:ReactNativeSignatureExample    文件:ReactInstanceManagerImpl.java   
private void recreateReactContextInBackgroundFromBundleFile() {
  recreateReactContextInBackground(
      new JSCJavaScriptExecutor.Factory(),
      JSBundleLoader.createFileLoader(mApplicationContext, mJSBundleFile));
}
项目:react-native-ibeacon-android    文件:ReactInstanceManagerImpl.java   
private void recreateReactContextInBackgroundFromBundleFile() {
  recreateReactContextInBackground(
      new JSCJavaScriptExecutor.Factory(),
      JSBundleLoader.createFileLoader(mApplicationContext, mJSBundleFile));
}
项目:react-native-box-loaders    文件:ReactInstanceManagerImpl.java   
private void recreateReactContextInBackgroundFromBundleFile() {
  recreateReactContextInBackground(
      new JSCJavaScriptExecutor.Factory(),
      JSBundleLoader.createFileLoader(mApplicationContext, mJSBundleFile));
}