Class WeakKeySet

java.lang.Object
com.google.inject.internal.WeakKeySet

final class WeakKeySet extends Object
Minimal set that doesn't hold strong references to the contained keys.
  • Field Details

    • backingMap

      private Map<Key<?>,com.google.common.collect.Multiset<Object>> backingMap
    • lock

      private final Object lock
      This is already locked externally on add and getSources but we need it to handle clean up in the evictionCache's RemovalListener.
    • evictionCache

      private final com.google.common.cache.Cache<InjectorBindingData,Set<WeakKeySet.KeyAndSource>> evictionCache
      Tracks child injector lifetimes and evicts banned keys/sources after the child injector is garbage collected.
  • Constructor Details

    • WeakKeySet

      WeakKeySet(Object lock)
  • Method Details