Class DelayedHk2InjectionManager

    • Field Detail

      • providers

        private final java.util.List<org.glassfish.hk2.utilities.Binder> providers
      • completed

        private boolean completed
    • Constructor Detail

      • DelayedHk2InjectionManager

        DelayedHk2InjectionManager​(java.lang.Object parent)
        Constructor with parent.
        Parameters:
        parent - parent of type InjectionManager or ServiceLocator.
    • Method Detail

      • register

        public void register​(Binding binding)
        Description copied from interface: InjectionManager
        Registers one bean represented using fields in the provided descriptor. The final bean can be direct bean or factory object which will create the bean at the time of injection. InjectionManager is able to register a bean represented by a class or direct instance.
        Parameters:
        binding - one descriptor.
        See Also:
        ClassBinding, InstanceBinding, SupplierClassBinding, SupplierInstanceBinding
      • register

        public void register​(java.lang.Iterable<Binding> bindings)
        Description copied from interface: InjectionManager
        Registers a collection of beans represented using fields in the provided descriptors. The final bean can be direct bean or factory object which will create the bean at the time of injection. InjectionManager is able to register a bean represented by a class or direct instance.
        Parameters:
        bindings - collection of descriptors.
        See Also:
        ClassBinding, InstanceBinding, SupplierClassBinding, SupplierInstanceBinding
      • register

        public void register​(Binder binder)
        Description copied from interface: InjectionManager
        Registers beans which are included in Binder. Binder can contains all descriptors extending Binding or other binders which are installed together in tree-structure. This method will get all descriptors bound in the given binder and register them in the order how the binders are installed together. In the tree structure, the deeper on the left side will be processed first.
        Parameters:
        binder - collection of descriptors.
        See Also:
        ClassBinding, InstanceBinding, SupplierClassBinding, SupplierInstanceBinding
      • register

        public void register​(java.lang.Object provider)
                      throws java.lang.IllegalArgumentException
        Description copied from interface: InjectionManager
        Registers a provider. An implementation of the InjectionManager should test whether the type of the object can be registered using the method InjectionManager.isRegistrable(Class). Then a caller has an certainty that the instance of the tested class can be registered in InjectionManager. If InjectionManager is not able to register the provider then IllegalArgumentException is thrown.
        Parameters:
        provider - object that can be registered in InjectionManager.
        Throws:
        java.lang.IllegalArgumentException - provider cannot be registered.
      • completeRegistration

        public void completeRegistration()
                                  throws java.lang.IllegalStateException
        Description copied from interface: InjectionManager
        Completes InjectionManager and the underlying DI provider. All registered components are bound to injection manager and after an invocation of this method all components are available using e.g. InjectionManager.getInstance(Class).
        Throws:
        java.lang.IllegalStateException