MentaContainer

Rev

Rev 41 | Blame | Compare with Previous | Last modification | View Log | RSS feed

package org.mentacontainer;

/**
 * An IoC component that knows how to create instances of itself.
 *
 * @author sergio.oliveira.jr@gmail.com
 */

public interface Component {
       
        /**
         * Instantiate the bean.
         *
         * @return The instantiated bean based on the container configuration.
         */

        public <T> T getInstance();
       
        /**
         * Is this component a singleton component, in other words,
         * it always returns the same instance?
         *
         * @return true if it is a singleton component
         */

        public boolean isSingleton();
}