Rev 91 | Rev 95 | 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 | |
92 | soliveira | 23 | public ConfigurableFactory addInitPrimitive(Object value); |
24 | |||
45 | soliveira | 25 | /** |
26 | * Add a property to be injected through a setter when the component is instantiated. |
||
27 | * |
||
28 | * @param name The property name. |
||
29 | * @param value The property value. |
||
30 | * @return The component itself. (Fluent API) |
||
31 | */ |
||
91 | soliveira | 32 | public ConfigurableFactory addPropertyValue(String name, Object value); |
33 | |||
34 | public ConfigurableFactory addInitDependency(String key); |
||
35 | |||
36 | public ConfigurableFactory addPropertyDependency(String property, String key); |
||
45 | soliveira | 37 | } |