Package com.stripe.android.core.injection

Types

Link copied to clipboard
@Module
class CoroutineContextModule
Link copied to clipboard
interface Injectable<FallbackInitializeParam>

Mark a class that can be injected by a Injector. This should be implemented by classes that cannot directly have their dependencies injected through constructor and need to have them injected through lateinit properties.

Link copied to clipboard
interface Injector

Mark a class that can inject into Injectables.

Link copied to clipboard
@Qualifier
annotation class InjectorKey

Annotation to identify an Injector instance.

Link copied to clipboard
interface InjectorRegistry

A registry to maintain Injector instances so that they can be retrieved from Activitys and Fragments. This registry is needed for dagger injection because the SDK can't access Application, and thus Activitys can't get required Component from by downcasting Activity.getApplication.

Link copied to clipboard
@Qualifier
annotation class IOContext

Qualifier for coroutine context used for IO.

Link copied to clipboard
@Module
class LoggingModule
Link copied to clipboard
@Qualifier
annotation class UIContext

Qualifier for coroutine context used for UI.

Link copied to clipboard
object WeakMapInjectorRegistry : InjectorRegistry

A InjectorRegistry implemented with a weak map. An entry from the map will be will be garbage collected once the Injector instance is no longer held elsewhere.

Functions

Link copied to clipboard
fun <FallbackInitializeParam> Injectable<FallbackInitializeParam>.injectWithFallback(injectorKey: String?, fallbackInitializeParam: FallbackInitializeParam)

Try use an InjectorKey to retrieve an Injector and inject, if no Injector is found, invoke Injectable.fallbackInitialize with fallbackInitializeParam.

Properties

Link copied to clipboard
const val DUMMY_INJECTOR_KEY: String

Dummy key when an Injector is not available.

Link copied to clipboard
const val ENABLE_LOGGING: String

Name for injected boolean to denote if logging is enabled.

Link copied to clipboard
const val PUBLISHABLE_KEY: String

Name for user's publishable key

Link copied to clipboard
const val STRIPE_ACCOUNT_ID: String

Name for user's account id