/** * Caches the specified factory under the specified category. */ private void cache(final Class category, final Object factory) { getCachedProviders(category).add(new WeakReference(factory)); }
/** * Caches the specified factory under the specified category. */ private <T> void cache(final Class<T> category, final T factory) { getCachedProviders(category).add(new WeakReference<T>(factory)); }