Class MembersInjectorStore

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

final class MembersInjectorStore extends Object
Members injectors by type.
  • Field Details

  • Constructor Details

  • Method Details

    • hasTypeListeners

      public boolean hasTypeListeners()
      Returns true if any type listeners are installed. Other code may take shortcuts when there aren't any type listeners.
    • get

      public <T> MembersInjectorImpl<T> get(TypeLiteral<T> key, Errors errors) throws ErrorsException
      Returns a new complete members injector with injection listeners registered.
      Throws:
      ErrorsException
    • remove

      boolean remove(TypeLiteral<?> type)
      Purges a type literal from the cache. Use this only if the type is not actually valid for binding and needs to be purged. (See issue 319 and ImplicitBindingTest#testCircularJitBindingsLeaveNoResidue and #testInstancesRequestingProvidersForThemselvesWithChildInjectors for examples of when this is necessary.)

      Returns true if the type was stored in the cache, false otherwise.

    • createWithListeners

      private <T> MembersInjectorImpl<T> createWithListeners(TypeLiteral<T> type, Errors errors) throws ErrorsException
      Creates a new members injector and attaches both injection listeners and method aspects.
      Throws:
      ErrorsException
    • getInjectors

      com.google.common.collect.ImmutableList<SingleMemberInjector> getInjectors(Set<InjectionPoint> injectionPoints, Errors errors)
      Returns the injectors for the specified injection points.
    • getAllInjectionPoints

      com.google.common.collect.ImmutableListMultimap<TypeLiteral<?>,InjectionPoint> getAllInjectionPoints()