1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package jp.liq.container.vocabulary;
17
18 import java.util.List;
19
20 import jp.liq.container.Component;
21 import jp.liq.container.Container;
22 import jp.liq.container.Module;
23
24 public class ComponentsConfig {
25 public ComponentsModule configure(Container container) {
26 ComponentsModule module = new ComponentsModule();
27 container.include(module);
28 return module;
29 }
30
31 public class ComponentsModule extends Module {
32
33
34
35
36
37
38 public <T> ComponentsModule define(Component<T> component) {
39 addComponent(component);
40 return this;
41 }
42
43
44
45
46
47
48
49 public final ComponentsModule define(List<? extends Component<?>> component) {
50 for (Component<?> c : component) {
51 define(c);
52 }
53 return this;
54 }
55
56 }
57 }