@Test public void anonymousProviderPermitted() { FooProvider provider = new FooProvider() { @Override public String name() { return "bar"; } @Override public String url() { return "http: } }; DNSApiManager mgr = ObjectGraph.create(Providers.provide(provider), new FooProvider.Module()).get( DNSApiManager.class); assertThat(mgr.provider().name()).isEqualTo("bar"); assertThat(provider.url()).isEqualTo("http: }
public static Object provide(denominator.Provider provider) { return new ProvideProvider(provider); }
Providers { public static Object provide(denominator.Provider provider) { return new ProvideProvider(provider); } }
Providers { public static Object provide(denominator.Provider provider) { return new ProvideProvider(provider); }  }
Providers { public static Object provide(denominator.Provider provider) { return new ProvideProvider(provider); }  static Iterable<Provider> list(); static Provider getByName(String providerName); static Provider withUrl(Provider provider, String url); static Object instantiateModule(Provider in); static Object provide(denominator.Provider provider); }
Providers { public static Object provide(denominator.Provider provider) { return new ProvideProvider(provider); }  static Iterable<Provider> list(); static Provider getByName(String providerName); static Provider withUrl(Provider provider, String url); static Object instantiateModule(Provider in); static Object provide(denominator.Provider provider);  }