MentaContainer

Rev

Rev 88 | Rev 92 | Go to most recent revision | Details | Compare with Previous | 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
86 soliveira 6
 * and properties for its setters. It can also be intercepted right
87 soliveira 7
 * after it is created/wired and right before it is destroyed through
8
 * the Interceptable interface.
45 soliveira 9
 *
10
 * @author sergio.oliveira.jr@gmail.com
11
 */
88 soliveira 12
public interface ConfigurableFactory extends Factory {
45 soliveira 13
 
14
        /**
15
         * Add a constructor parameter to be used when the bean is instantiated. It can be called more than once to
16
         * use constructors with more than one argument.
17
         *
18
         * @param value A parameter value to be used by a constructor.
19
         * @return The component itself. (Fluent API)
20
         */
88 soliveira 21
        public ConfigurableFactory addInitValue(Object value);
45 soliveira 22
 
91 soliveira 23
        public ConfigurableFactory addInitValue(int x);
24
        public ConfigurableFactory addInitValue(boolean b);
25
        public ConfigurableFactory addInitValue(long l);
26
        public ConfigurableFactory addInitValue(float f);
27
        public ConfigurableFactory addInitValue(short s);
28
        public ConfigurableFactory addInitValue(double d);
29
        public ConfigurableFactory addInitValue(byte b);
30
        public ConfigurableFactory addInitValue(char c);
31
 
45 soliveira 32
        /**
33
         * Add a property to be injected through a setter when the component is instantiated.
34
         *
35
         * @param name The property name.
36
         * @param value The property value.
37
         * @return The component itself. (Fluent API)
38
         */
91 soliveira 39
        public ConfigurableFactory addPropertyValue(String name, Object value);
40
 
41
        public ConfigurableFactory addInitDependency(String key);
42
 
43
        public ConfigurableFactory addPropertyDependency(String property, String key);
45 soliveira 44
}