MentaContainer

Rev

Rev 86 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
45 soliveira 1
package org.mentacontainer;
2
 
3
/**
4
 * An IoC component that knows how to create instances of itself and
5
 * can be configured by accepting values for its constructor
6
 * and properties for its setters.
7
 *
8
 * @author sergio.oliveira.jr@gmail.com
9
 */
10
public interface ConfigurableComponent extends Component {
11
 
12
        /**
13
         * Add a constructor parameter to be used when the bean is instantiated. It can be called more than once to
14
         * use constructors with more than one argument.
15
         *
16
         * @param value A parameter value to be used by a constructor.
17
         * @return The component itself. (Fluent API)
18
         */
19
        public ConfigurableComponent addInitValue(Object value);
20
 
21
        /**
22
         * Add a property to be injected through a setter when the component is instantiated.
23
         *
24
         * @param name The property name.
25
         * @param value The property value.
26
         * @return The component itself. (Fluent API)
27
         */
28
        public ConfigurableComponent addProperty(String name, Object value);
29
}