Home
last modified time | relevance | path

Searched refs:converter (Results 1 – 25 of 51) sorted by relevance

123

/expo/packages/expo-modules-core/android/src/test/java/expo/modules/kotlin/types/
H A DEnumTypeConverterTest.kt26 val converter = obtainTypeConverter<EnumWithoutParameter>() in should convert string to enum without parameter() constant
38 val converter = obtainTypeConverter<EnumWithInt>() in should convert string to enum with int parameter() constant
40 Truth.assertThat(converter.convert(v1)).isSameInstanceAs(EnumWithInt.VALUE1) in should convert string to enum with int parameter()
41 Truth.assertThat(converter.convert(v2)).isSameInstanceAs(EnumWithInt.VALUE2) in should convert string to enum with int parameter()
42 Truth.assertThat(converter.convert(v3)).isSameInstanceAs(EnumWithInt.VALUE3) in should convert string to enum with int parameter()
50 val converter = obtainTypeConverter<EnumWithString>() in should convert string to enum with string parameter() constant
52 Truth.assertThat(converter.convert(v1)).isSameInstanceAs(EnumWithString.VALUE1) in should convert string to enum with string parameter()
53 Truth.assertThat(converter.convert(v2)).isSameInstanceAs(EnumWithString.VALUE2) in should convert string to enum with string parameter()
54 Truth.assertThat(converter.convert(v3)).isSameInstanceAs(EnumWithString.VALUE3) in should convert string to enum with string parameter()
60 val converter = obtainTypeConverter<EnumWithoutParameter>() in should throw when value is invalid() constant
[all …]
/expo/android/versioned-abis/expoview-abi48_0_0/src/main/java/abi48_0_0/expo/modules/kotlin/types/
H A DAnyType.kt9 private val converter: TypeConverter<*> by lazy { in toAnyType() constant in abi48_0_0.expo.modules.kotlin.types.AnyType
13 fun convert(value: Any?): Any? = converter.convert(value) in toAnyType()
15 fun getCppRequiredTypes(): ExpectedType = converter.getCppRequiredTypes() in toAnyType()
H A DEitherTypeConverter.kt25 … val convertValueIfNeeded = Convert@{ types: Array<out SingleType>, converter: TypeConverter<*> -> in <lambda>() method
31 Either(converter.convert(value)!!) in <lambda>()
75 … val convertValueIfNeeded = Convert@{ types: Array<out SingleType>, converter: TypeConverter<*> -> in convertNonOptional() method
81 EitherOfThree(converter.convert(value)!!) in convertNonOptional()
131 … val convertValueIfNeeded = Convert@{ types: Array<out SingleType>, converter: TypeConverter<*> -> in getCppRequiredTypes() method
137 EitherOfFour(converter.convert(value)!!) in getCppRequiredTypes()
H A DTypeConverterProvider.kt55 val converter = TypeConverterProviderImpl.obtainTypeConverter(typeOf<T>()) in convert() constant
56 return converter.convert(value) as T in convert()
60 val converter = TypeConverterProviderImpl.obtainTypeConverter(typeOf<T>()) in convert() constant
61 return converter.convert(value) as T in convert()
65 val converter = TypeConverterProviderImpl.obtainTypeConverter(type) in convert() constant
66 return converter.convert(value) in convert()
111 val converter = RecordTypeConverter<Record>(this, type) in obtainTypeConverter() constant
112 cachedRecordConverters[kClass] = converter in obtainTypeConverter()
113 return converter in obtainTypeConverter()
/expo/android/versioned-abis/expoview-abi47_0_0/src/main/java/abi47_0_0/expo/modules/kotlin/types/
H A DAnyType.kt9 private val converter: TypeConverter<*> by lazy { in toAnyType() constant in abi47_0_0.expo.modules.kotlin.types.AnyType
13 fun convert(value: Any?): Any? = converter.convert(value) in toAnyType()
15 fun getCppRequiredTypes(): ExpectedType = converter.getCppRequiredTypes() in toAnyType()
H A DEitherTypeConverter.kt25 … val convertValueIfNeeded = Convert@{ types: Array<out SingleType>, converter: TypeConverter<*> -> in <lambda>() method
31 Either(converter.convert(value)!!) in <lambda>()
73 … val convertValueIfNeeded = Convert@{ types: Array<out SingleType>, converter: TypeConverter<*> -> in convertNonOptional() method
79 EitherOfThree(converter.convert(value)!!) in convertNonOptional()
129 … val convertValueIfNeeded = Convert@{ types: Array<out SingleType>, converter: TypeConverter<*> -> in getCppRequiredTypes() method
135 EitherOfFour(converter.convert(value)!!) in getCppRequiredTypes()
H A DTypeConverterProvider.kt55 val converter = TypeConverterProviderImpl.obtainTypeConverter(typeOf<T>()) in convert() constant
56 return converter.convert(value) as T in convert()
60 val converter = TypeConverterProviderImpl.obtainTypeConverter(typeOf<T>()) in convert() constant
61 return converter.convert(value) as T in convert()
65 val converter = TypeConverterProviderImpl.obtainTypeConverter(type) in convert() constant
66 return converter.convert(value) in convert()
111 val converter = RecordTypeConverter<Record>(this, type) in obtainTypeConverter() constant
112 cachedRecordConverters[kClass] = converter in obtainTypeConverter()
113 return converter in obtainTypeConverter()
/expo/packages/expo-modules-core/android/src/main/java/expo/modules/kotlin/jni/
H A DJavaScriptFunction.kt27 val converter = TypeConverterProviderImpl in isValid() constant
30 val expectedReturnType = converter.getCppRequiredTypes() in isValid()
33 return converter.convert(result, appContext) as ReturnType in isValid()
/expo/android/versioned-abis/expoview-abi49_0_0/src/main/java/abi49_0_0/expo/modules/kotlin/jni/
H A DJavaScriptFunction.kt27 val converter = TypeConverterProviderImpl in isValid() constant
30 val expectedReturnType = converter.getCppRequiredTypes() in isValid()
33 return converter.convert(result, appContext) as ReturnType in isValid()
/expo/packages/expo-modules-core/android/src/main/java/expo/modules/kotlin/types/
H A DAnyType.kt58 private val converter: TypeConverter<*> by lazy { in toAnyType() constant in expo.modules.kotlin.types.AnyType
62 …fun convert(value: Any?, appContext: AppContext? = null): Any? = converter.convert(value, appConte… in toAnyType()
64 fun getCppRequiredTypes(): ExpectedType = converter.getCppRequiredTypes() in toAnyType()
H A DEitherTypeConverter.kt26 … val convertValueIfNeeded = Convert@{ types: Array<out SingleType>, converter: TypeConverter<*> -> in <lambda>() method
32 Either(converter.convert(value)!!) in <lambda>()
76 … val convertValueIfNeeded = Convert@{ types: Array<out SingleType>, converter: TypeConverter<*> -> in convertNonOptional() method
82 EitherOfThree(converter.convert(value)!!) in convertNonOptional()
132 … val convertValueIfNeeded = Convert@{ types: Array<out SingleType>, converter: TypeConverter<*> -> in getCppRequiredTypes() method
138 EitherOfFour(converter.convert(value)!!) in getCppRequiredTypes()
H A DTypeConverterProvider.kt59 val converter = TypeConverterProviderImpl.obtainTypeConverter(typeOf<T>()) in convert() constant
60 return converter.convert(value) as T in convert()
64 val converter = TypeConverterProviderImpl.obtainTypeConverter(typeOf<T>()) in convert() constant
65 return converter.convert(value) as T in convert()
69 val converter = TypeConverterProviderImpl.obtainTypeConverter(type) in convert() constant
70 return converter.convert(value) in convert()
126 val converter = RecordTypeConverter<Record>(this, type) in obtainTypeConverter() constant
127 cachedRecordConverters[kClass] = converter in obtainTypeConverter()
128 return converter in obtainTypeConverter()
/expo/android/versioned-abis/expoview-abi49_0_0/src/main/java/abi49_0_0/expo/modules/kotlin/types/
H A DAnyType.kt58 private val converter: TypeConverter<*> by lazy { in toAnyType() constant in abi49_0_0.expo.modules.kotlin.types.AnyType
62 …fun convert(value: Any?, appContext: AppContext? = null): Any? = converter.convert(value, appConte… in toAnyType()
64 fun getCppRequiredTypes(): ExpectedType = converter.getCppRequiredTypes() in toAnyType()
H A DEitherTypeConverter.kt26 … val convertValueIfNeeded = Convert@{ types: Array<out SingleType>, converter: TypeConverter<*> -> in <lambda>() method
32 Either(converter.convert(value)!!) in <lambda>()
76 … val convertValueIfNeeded = Convert@{ types: Array<out SingleType>, converter: TypeConverter<*> -> in convertNonOptional() method
82 EitherOfThree(converter.convert(value)!!) in convertNonOptional()
132 … val convertValueIfNeeded = Convert@{ types: Array<out SingleType>, converter: TypeConverter<*> -> in getCppRequiredTypes() method
138 EitherOfFour(converter.convert(value)!!) in getCppRequiredTypes()
H A DTypeConverterProvider.kt60 val converter = TypeConverterProviderImpl.obtainTypeConverter(typeOf<T>()) in convert() constant
61 return converter.convert(value) as T in convert()
65 val converter = TypeConverterProviderImpl.obtainTypeConverter(typeOf<T>()) in convert() constant
66 return converter.convert(value) as T in convert()
70 val converter = TypeConverterProviderImpl.obtainTypeConverter(type) in convert() constant
71 return converter.convert(value) in convert()
127 val converter = RecordTypeConverter<Record>(this, type) in obtainTypeConverter() constant
128 cachedRecordConverters[kClass] = converter in obtainTypeConverter()
129 return converter in obtainTypeConverter()
/expo/packages/expo-modules-core/android/src/main/cpp/
H A DJavaScriptFunction.cpp52 auto converter = AnyType(jni::make_local(expectedReturnType)).converter; in invoke() local
53 auto convertedResult = converter->convert(rt, env, moduleRegistry, result); in invoke()
/expo/packages/expo-image/android/src/main/java/expo/modules/image/blurhash/
H A DBlurhashModelLoader.kt26 private fun <T> getPath(uri: Uri, index: Int, default: T, converter: (String) -> T): T { in getPath()
28 return converter(value) in getPath()
/expo/android/versioned-abis/expoview-abi48_0_0/src/main/java/abi48_0_0/expo/modules/image/blurhash/
H A DBlurhashModelLoader.kt26 private fun <T> getPath(uri: Uri, index: Int, default: T, converter: (String) -> T): T { in getPath()
28 return converter(value) in getPath()
/expo/android/versioned-abis/expoview-abi49_0_0/src/main/java/abi49_0_0/expo/modules/image/blurhash/
H A DBlurhashModelLoader.kt26 private fun <T> getPath(uri: Uri, index: Int, default: T, converter: (String) -> T): T { in getPath()
28 return converter(value) in getPath()
/expo/packages/expo-modules-core/android/src/main/cpp/types/
H A DAnyType.cpp10 ) : converter(FrontendConverterProvider::instance()->obtainConverter(std::move(expectedType))) {} in AnyType()
H A DAnyType.h25 std::shared_ptr<FrontendConverter> converter; variable
H A DFrontendConverter.cpp264 [&rt = rt, &value = value](const std::shared_ptr<FrontendConverter> &converter) { in canConvert() argument
265 return converter->canConvert(rt, value); in canConvert()
276 for (auto &converter: converters) { in convert() local
277 if (converter->canConvert(rt, value)) { in convert()
278 return converter->convert(rt, env, moduleRegistry, value); in convert()
/expo/ios/versioned-react-native/ABI49_0_0/ReactNative/ReactCommon/react/bridging/
H A DABI49_0_0Convert.h158 auto convert(jsi::Runtime &rt, Converter<T> &&converter) {
159 return std::move(converter);
/expo/ios/versioned-react-native/ABI48_0_0/ReactNative/ReactCommon/react/bridging/
H A DABI48_0_0Convert.h158 auto convert(jsi::Runtime &rt, Converter<T> &&converter) {
159 return std::move(converter);
/expo/ios/versioned-react-native/ABI47_0_0/ReactNative/ReactCommon/react/bridging/
H A DABI47_0_0Convert.h158 auto convert(jsi::Runtime &rt, Converter<T> &&converter) {
159 return std::move(converter);

123