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

项目:RNNavitiaSDK    文件:RNNavitiaSDK.java   
private Object extractMapValue(ReadableMap params, HashMap<String, Object> paramsMap, String key) {
    Object mapValue;
    if (ReadableType.Number == params.getType(key)) {
        try {
            mapValue = params.getInt(key);
        } catch (UnexpectedNativeTypeException e) {
            mapValue = params.getDouble(key);
        }
    } else {
        mapValue = paramsMap.get(key);
    }

    return mapValue;
}
项目:RNLearn_Project1    文件:CatalystNativeJSToJavaParametersTestCase.java   
private void assertUnexpectedTypeExceptionThrown(
    ReadableArray array,
    int index,
    String typeToAskFor) {
  boolean gotException = false;
  try {
    arrayGetByType(array, index, typeToAskFor);
  } catch (UnexpectedNativeTypeException expected) {
    gotException = true;
  }

  assertTrue(gotException);
}
项目:RNLearn_Project1    文件:CatalystNativeJSToJavaParametersTestCase.java   
private void assertUnexpectedTypeExceptionThrown(
    ReadableMap map,
    String key,
    String typeToAskFor) {
  boolean gotException = false;
  try {
    mapGetByType(map, key, typeToAskFor);
  } catch (UnexpectedNativeTypeException expected) {
    gotException = true;
  }

  assertTrue(gotException);
}
项目:RNLearn_Project1    文件:CatalystNativeJSToJavaParametersTestCase.java   
private void assertUnexpectedTypeExceptionThrown(
    ReadableArray array,
    int index,
    String typeToAskFor) {
  boolean gotException = false;
  try {
    arrayGetByType(array, index, typeToAskFor);
  } catch (UnexpectedNativeTypeException expected) {
    gotException = true;
  }

  assertTrue(gotException);
}
项目:RNLearn_Project1    文件:CatalystNativeJSToJavaParametersTestCase.java   
private void assertUnexpectedTypeExceptionThrown(
    ReadableMap map,
    String key,
    String typeToAskFor) {
  boolean gotException = false;
  try {
    mapGetByType(map, key, typeToAskFor);
  } catch (UnexpectedNativeTypeException expected) {
    gotException = true;
  }

  assertTrue(gotException);
}
项目:Ironman    文件:CatalystNativeJSToJavaParametersTestCase.java   
private void assertUnexpectedTypeExceptionThrown(
    ReadableArray array,
    int index,
    String typeToAskFor) {
  boolean gotException = false;
  try {
    arrayGetByType(array, index, typeToAskFor);
  } catch (UnexpectedNativeTypeException expected) {
    gotException = true;
  }

  assertTrue(gotException);
}
项目:Ironman    文件:CatalystNativeJSToJavaParametersTestCase.java   
private void assertUnexpectedTypeExceptionThrown(
    ReadableMap map,
    String key,
    String typeToAskFor) {
  boolean gotException = false;
  try {
    mapGetByType(map, key, typeToAskFor);
  } catch (UnexpectedNativeTypeException expected) {
    gotException = true;
  }

  assertTrue(gotException);
}