Interface ConfigurableComponentFactory

    • Method Detail

      • getConfiguration

        Conf getConfiguration()
        Gets the configuration used by this component factory.
        Returns:
        the Conf
      • getComponent

        default <T> T getComponent​(Class<T> type)
        Gets an instance, which may be shared or independent, for the specified type.
        Type Parameters:
        T - the component-type.
        Parameters:
        type - the component class.
        Returns:
        the instance of type ConfigurableComponentFactory.
        Throws:
        NoUniqueComponentException - if more than one component is registered for the given type.
        NoSuchComponentException - if no component is registered for the given type.
      • getComponent

        default <T> T getComponent​(Class<T> type,
                                   Qualifier<T> qualifier)
        Gets an instance, which may be shared or independent, for the specified type.
        Type Parameters:
        T - the component-type.
        Parameters:
        type - the component class.
        qualifier - the options used to qualify the component.
        Returns:
        the instance of type ConfigurableComponentFactory.
        Throws:
        NoUniqueComponentException - if more than one component is registered for the given type.
        NoSuchComponentException - if no component is registered for the given type.
      • getComponent

        default <T> T getComponent​(String alias)
        Gets an instance, which may be shared or independent, for the specified type.
        Type Parameters:
        T - the component-type.
        Parameters:
        alias - the fully qualified class name or an alias of the component.
        Returns:
        the instance of type ConfigurableComponentFactory.
        Throws:
        NoUniqueComponentException - if more than one component is registered for the given type.
        NoSuchComponentException - if no component is registered for the given class or alias..
      • getComponent

        default <T> T getComponent​(String alias,
                                   Qualifier<T> qualifier)
        Gets an instance, which may be shared or independent, for the specified type.
        Type Parameters:
        T - the component-type.
        Parameters:
        alias - the fully qualified class name or an alias of the component.
        qualifier - the options used to qualify the component.
        Returns:
        the instance of type ConfigurableComponentFactory.
        Throws:
        NoUniqueComponentException - if more than one component is registered for the given type.
        NoSuchComponentException - if no component is registered for the given class or alias..
      • getAllComponents

        default <T> Collection<T> getAllComponents​(String alias)
        Gets all instances, which may be shared or independent, for the specified type.
        Type Parameters:
        T - the component-type.
        Parameters:
        alias - the fully qualified class name or an alias of the component.
        Returns:
        all instances of type ConfigurableComponentFactory.
      • getAllComponents

        default <T> Collection<T> getAllComponents​(String alias,
                                                   Qualifier<T> qualifier)
        Gets all instances, which may be shared or independent, for the specified type.
        Type Parameters:
        T - the component-type.
        Parameters:
        alias - the fully qualified class name or an alias of the component.
        qualifier - the options used to qualify the component.
        Returns:
        all instances of type ConfigurableComponentFactory.
      • getAllComponents

        default <T> Collection<T> getAllComponents​(Class<T> type)
        Gets all instances, which may be shared or independent, for the specified type.
        Type Parameters:
        T - the component-type.
        Parameters:
        type - the component class.
        Returns:
        all instances of type ConfigurableComponentFactory.
      • getAllComponents

        default <T> Collection<T> getAllComponents​(Class<T> type,
                                                   Qualifier<T> qualifier)
        Gets all instances, which may be shared or independent, for the specified type.
        Type Parameters:
        T - the component-type.
        Parameters:
        type - the component class.
        qualifier - the options used to qualify the component.
        Returns:
        all instances of type ConfigurableComponentFactory.