1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| |
8 |
| |
9 |
| |
10 |
| |
11 |
| package org.picocontainer.defaults; |
12 |
| |
13 |
| import org.picocontainer.ComponentAdapter; |
14 |
| import org.picocontainer.Parameter; |
15 |
| import org.picocontainer.PicoIntrospectionException; |
16 |
| |
17 |
| import java.io.Serializable; |
18 |
| |
19 |
| |
20 |
| |
21 |
| |
22 |
| |
23 |
| |
24 |
| |
25 |
| |
26 |
| |
27 |
| public class DefaultComponentAdapterFactory implements ComponentAdapterFactory, Serializable { |
28 |
| |
29 |
| private ComponentMonitor componentMonitor; |
30 |
| |
31 |
0
| public DefaultComponentAdapterFactory(ComponentMonitor componentMonitor) {
|
32 |
0
| this.componentMonitor = componentMonitor;
|
33 |
| } |
34 |
| |
35 |
860
| public DefaultComponentAdapterFactory() {
|
36 |
860
| this.componentMonitor = NullComponentMonitor.getInstance();
|
37 |
| } |
38 |
| |
39 |
878
| public ComponentAdapter createComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters) throws PicoIntrospectionException, AssignabilityRegistrationException, NotConcreteRegistrationException {
|
40 |
878
| return new CachingComponentAdapter(new ConstructorInjectionComponentAdapter(componentKey, componentImplementation, parameters, false, componentMonitor));
|
41 |
| } |
42 |
| } |