Interface ComponentAdapter<T>

    • Method Detail

      • getComponentKey

        Object getComponentKey()
        Retrieve the key associated with the component.
        Specified by:
        getComponentKey in interface ComponentAdapter<T>
        Returns:
        the component's key. Should either be a class type (normally an interface) or an identifier that is unique (within the scope of the current Container).
      • getComponentImplementation

        Class<? extends T> getComponentImplementation()
        Retrieve the class of the component.
        Specified by:
        getComponentImplementation in interface ComponentAdapter<T>
        Returns:
        the component's implementation class. Should normally be a concrete class (ie, a class that can be instantiated).
      • getComponentInstance

        T getComponentInstance()
                        throws ContainerException
        Retrieve the component instance. This method will usually create a new instance each time it is called, but that is not required.
        Returns:
        the component instance.
        Throws:
        ContainerException - if the component could not be instantiated. Or if the component has dependencies which could not be resolved, or instantiation of the component lead to an ambiguous situation within the container.
      • isSingleton

        boolean isSingleton()
        Indicates whether or not this adapter is a singleton