Search in sources :

Example 1 with ProviderListeners

use of proton.inject.listener.ProviderListeners in project AndroidTraining by mixi-inc.

the class Proton method initialize.

public static void initialize(Application app, Module... modules) {
    synchronized (Proton.class) {
        checkState(sInjectors == null, "Already initialized Proton");
        sInjectors = new WeakHashMap<Context, InjectorImpl>();
        sBindings = new Bindings();
        sProviderListeners = new ProviderListeners();
        sFieldListeners = new FieldListeners();
        for (Module module : modules) module.configure(sBindings, sProviderListeners, sFieldListeners);
        InjectorImpl injector = new InjectorImpl(app, sBindings, sProviderListeners, sFieldListeners, null);
        sInjectors.put(app, injector);
    }
}
Also used : Context(android.content.Context) InjectorImpl(proton.inject.internal.InjectorImpl) FieldListeners(proton.inject.listener.FieldListeners) ProviderListeners(proton.inject.listener.ProviderListeners) Bindings(proton.inject.binding.Bindings)

Aggregations

Context (android.content.Context)1 Bindings (proton.inject.binding.Bindings)1 InjectorImpl (proton.inject.internal.InjectorImpl)1 FieldListeners (proton.inject.listener.FieldListeners)1 ProviderListeners (proton.inject.listener.ProviderListeners)1