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.PicoContainer; |
15 |
| import org.picocontainer.PicoInitializationException; |
16 |
| import org.picocontainer.PicoIntrospectionException; |
17 |
| import org.picocontainer.PicoVisitor; |
18 |
| |
19 |
| import java.io.Serializable; |
20 |
| |
21 |
| |
22 |
| |
23 |
| |
24 |
| |
25 |
| |
26 |
| public class DecoratingComponentAdapter implements ComponentAdapter, Serializable { |
27 |
| |
28 |
| private ComponentAdapter delegate; |
29 |
| |
30 |
1316
| public DecoratingComponentAdapter(ComponentAdapter delegate) {
|
31 |
1316
| this.delegate = delegate;
|
32 |
| } |
33 |
| |
34 |
3854
| public Object getComponentKey() {
|
35 |
3854
| return delegate.getComponentKey();
|
36 |
| } |
37 |
| |
38 |
3994
| public Class getComponentImplementation() {
|
39 |
3994
| return delegate.getComponentImplementation();
|
40 |
| } |
41 |
| |
42 |
926
| public Object getComponentInstance(PicoContainer container) throws PicoInitializationException, PicoIntrospectionException {
|
43 |
926
| return delegate.getComponentInstance(container);
|
44 |
| } |
45 |
| |
46 |
88
| public void verify(PicoContainer container) throws PicoIntrospectionException {
|
47 |
88
| delegate.verify(container);
|
48 |
| } |
49 |
| |
50 |
296
| public ComponentAdapter getDelegate() {
|
51 |
296
| return delegate;
|
52 |
| } |
53 |
| |
54 |
150
| public void accept(PicoVisitor visitor) {
|
55 |
150
| visitor.visitComponentAdapter(this);
|
56 |
150
| delegate.accept(visitor);
|
57 |
| } |
58 |
| |
59 |
0
| public String toString() {
|
60 |
0
| StringBuffer buffer = new StringBuffer(this.getClass().getName());
|
61 |
0
| buffer.append("[");
|
62 |
0
| buffer.append(delegate.toString());
|
63 |
0
| buffer.append("]");
|
64 |
0
| return buffer.toString();
|
65 |
| } |
66 |
| } |