@Test public void wrappedManagerShouldNotBeAffected() { final Provider<Collection> collectionProvider = manager.get(Collection.class); assert collectionProvider != null; final Collection c = collectionProvider.getInstance(); Assert.assertEquals(c.size(), 0); Assert.assertEquals(Collection.class, collectionProvider.getType()); }
@SuppressWarnings("unchecked") @Nullable public <T> Provider<T> get(Class<T> type) { return (Provider<T>) providers.get(type.getName()); }
ProviderManagerImpl implements ProviderManager { @SuppressWarnings("unchecked") @Nullable public <T> Provider<T> get(Class<T> type) { return (Provider<T>) providers.get(type.getName()); } }
ProviderManagerImpl implements ProviderManager { @SuppressWarnings("unchecked") @Nullable public <T> Provider<T> get(Class<T> type) { return (Provider<T>) providers.get(type.getName()); } ProviderManagerImpl(); }
ProviderManagerImpl implements ProviderManager { @SuppressWarnings("unchecked") @Nullable public <T> Provider<T> get(Class<T> type) { return (Provider<T>) providers.get(type.getName()); } ProviderManagerImpl(); HandlerRegistration register(Provider<?> provider); @SuppressWarnings("unchecked") @Nullable Provider<T> get(Class<T> type); }
ProviderManagerImpl implements ProviderManager { @SuppressWarnings("unchecked") @Nullable public <T> Provider<T> get(Class<T> type) { return (Provider<T>) providers.get(type.getName()); } ProviderManagerImpl(); HandlerRegistration register(Provider<?> provider); @SuppressWarnings("unchecked") @Nullable Provider<T> get(Class<T> type);  }