Jeevan Deep Singh
10/21/2024, 11:12 AMinterface RemoteFeatureFlagProvider {
fun fetchFullConfig(useNetwork: Boolean)
fun <T> getFeatureFlag(key: String, type: Class<T>): T
}
inline fun <reified T> RemoteFeatureFlagProvider.get(key: String): T {
return getFeatureFlag(key, T::class.java)
}
is there a way to hide fun <T> getFeatureFlag(key: String, type: Class<T>): T
from being accessed ? I want the users to use only extension function so that they can directly use generics instead of passing Foo::class.java
in the interface methodJeevan Deep Singh
10/21/2024, 11:18 AMphldavies
10/21/2024, 12:17 PMJeevan Deep Singh
10/21/2024, 12:55 PMinternal
so i cannot access that method through a public inline method 😕Szymon Jeziorski
10/21/2024, 1:25 PM@PublishedApi
allows you to call internal classes/members from public inline functions: some site with example