MentaContainer

Rev

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

Rev Author Line No. Line
20 soliveira 1
package org.mentacontainer;
2
 
3
/**
45 soliveira 4
 * An IoC component that knows how to create instances of itself.
20 soliveira 5
 *
6
 * @author sergio.oliveira.jr@gmail.com
7
 */
8
public interface Component {
9
 
10
        /**
11
         * Instantiate the bean.
12
         *
13
         * @return The instantiated bean based on the container configuration.
14
         */
41 soliveira 15
        public <T> T getInstance();
20 soliveira 16
 
17
        /**
18
         * Is this component a singleton component, in other words,
19
         * it always returns the same instance?
20
         *
21
         * @return true if it is a singleton component
22
         */
23
        public boolean isSingleton();
24
}