Interface State

All Known Implementing Classes:
InheritingState

interface State
The inheritable data within an injector. This class is intended to allow parent and local injector data to be accessed as a unit.
  • Field Details

    • NONE

      static final State NONE
  • Method Details

    • parent

      State parent()
    • getExplicitBinding

      <T> BindingImpl<T> getExplicitBinding(Key<T> key)
      Gets a binding which was specified explicitly in a module, or null.
    • getExplicitBindingsThisLevel

      Map<Key<?>,Binding<?>> getExplicitBindingsThisLevel()
      Returns the explicit bindings at this level only.
    • putBinding

      void putBinding(Key<?> key, BindingImpl<?> binding)
    • putProviderLookup

      void putProviderLookup(ProviderLookup<?> lookup)
    • getProviderLookupsThisLevel

      Set<ProviderLookup<?>> getProviderLookupsThisLevel()
    • putStaticInjectionRequest

      void putStaticInjectionRequest(StaticInjectionRequest staticInjectionRequest)
    • getStaticInjectionRequestsThisLevel

      Set<StaticInjectionRequest> getStaticInjectionRequestsThisLevel()
    • getScopeBinding

      ScopeBinding getScopeBinding(Class<? extends Annotation> scopingAnnotation)
    • putInjectionRequest

      void putInjectionRequest(InjectionRequest<?> injectionRequest)
    • getInjectionRequestsThisLevel

      Set<InjectionRequest<?>> getInjectionRequestsThisLevel()
    • putMembersInjectorLookup

      void putMembersInjectorLookup(MembersInjectorLookup<?> membersInjectorLookup)
    • getMembersInjectorLookupsThisLevel

      Set<MembersInjectorLookup<?>> getMembersInjectorLookupsThisLevel()
    • putScopeBinding

      void putScopeBinding(Class<? extends Annotation> annotationType, ScopeBinding scope)
    • getScopeBindingsThisLevel

      Collection<ScopeBinding> getScopeBindingsThisLevel()
    • addConverter

      void addConverter(TypeConverterBinding typeConverterBinding)
    • getConverter

      TypeConverterBinding getConverter(String stringValue, TypeLiteral<?> type, Errors errors, Object source)
      Returns the matching converter for type, or null if none match.
    • getConvertersThisLevel

      Iterable<TypeConverterBinding> getConvertersThisLevel()
      Returns all converters at this level only.
    • addTypeListener

      void addTypeListener(TypeListenerBinding typeListenerBinding)
    • getTypeListenerBindings

      List<TypeListenerBinding> getTypeListenerBindings()
    • getTypeListenerBindingsThisLevel

      List<TypeListenerBinding> getTypeListenerBindingsThisLevel()
    • addProvisionListener

      void addProvisionListener(ProvisionListenerBinding provisionListenerBinding)
    • getProvisionListenerBindings

      List<ProvisionListenerBinding> getProvisionListenerBindings()
    • getProvisionListenerBindingsThisLevel

      List<ProvisionListenerBinding> getProvisionListenerBindingsThisLevel()
    • addScanner

      void addScanner(ModuleAnnotatedMethodScannerBinding scanner)
    • getScannerBindings

    • getScannerBindingsThisLevel

      List<ModuleAnnotatedMethodScannerBinding> getScannerBindingsThisLevel()
    • blacklist

      void blacklist(Key<?> key, State state, Object source)
      Forbids the corresponding injector from creating a binding to key. Child injectors blacklist their bound keys on their parent injectors to prevent just-in-time bindings on the parent injector that would conflict and pass along their state to control the lifetimes.
    • isBlacklisted

      boolean isBlacklisted(Key<?> key)
      Returns true if key is forbidden from being bound in this injector. This indicates that one of this injector's descendent's has bound the key.
    • getSourcesForBlacklistedKey

      Set<Object> getSourcesForBlacklistedKey(Key<?> key)
      Returns the source of a blacklisted key.
    • lock

      Object lock()
      Returns the shared lock for all injector data. This is a low-granularity, high-contention lock to be used when reading mutable data (ie. just-in-time bindings, and binding blacklists).
    • getScopes

      Map<Class<? extends Annotation>,Scope> getScopes()
      Returns all the scope bindings at this level and parent levels.