Class ComponentModule<T>

    • Constructor Detail

      • ComponentModule

        protected ComponentModule​(Class<T> type)
        Creates a new ComponentModule instance.
        Parameters:
        type - the component type.
    • Method Detail

      • configure

        public void configure​(Conf configuration)
        Configures this instance with the specified Conf.
        Specified by:
        configure in interface Configurable
        Parameters:
        configuration - the Conf instance used to configure this instance.
      • configuration

        protected Conf configuration()
      • getComponentForType

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

        protected <C> C getComponentForClassOrAlias​(String classOrAlias)
        Gets an instance, which may be shared or independent, for the specified type.
        Type Parameters:
        C - the component-type.
        Parameters:
        classOrAlias - the fully qualified class name or an alias of the component.
        Returns:
        the instance of type ComponentModule.
        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..
      • getAllComponentsForType

        protected <C> Collection<C> getAllComponentsForType​(Class<C> type)
        Gets all instances, which may be shared or independent, for the specified type.
        Type Parameters:
        C - the component-type.
        Parameters:
        type - the component class.
        Returns:
        the instance of type ComponentModule.