|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
InstanceComponentAdapter.java | - | 100% | 100% | 100% |
|
1 |
/*****************************************************************************
|
|
2 |
* Copyright (C) PicoContainer Organization. All rights reserved. *
|
|
3 |
* ------------------------------------------------------------------------- *
|
|
4 |
* The software in this package is published under the terms of the BSD *
|
|
5 |
* style license a copy of which has been included with this distribution in *
|
|
6 |
* the LICENSE.txt file. *
|
|
7 |
* *
|
|
8 |
* Original code by *
|
|
9 |
*****************************************************************************/
|
|
10 |
package org.picocontainer.defaults;
|
|
11 |
|
|
12 |
import org.picocontainer.PicoContainer;
|
|
13 |
|
|
14 |
/**
|
|
15 |
* @author Aslak Hellesøy
|
|
16 |
* @author Paul Hammant
|
|
17 |
* @version $Revision: 1.12 $
|
|
18 |
*/
|
|
19 |
public class InstanceComponentAdapter extends AbstractComponentAdapter { |
|
20 |
private Object componentInstance;
|
|
21 |
|
|
22 | 292 |
public InstanceComponentAdapter(Object componentKey, Object componentInstance) throws AssignabilityRegistrationException, NotConcreteRegistrationException { |
23 | 292 |
super(componentKey, componentInstance.getClass());
|
24 | 292 |
this.componentInstance = componentInstance;
|
25 |
} |
|
26 |
|
|
27 | 286 |
public Object getComponentInstance(PicoContainer container) {
|
28 | 286 |
return componentInstance;
|
29 |
} |
|
30 |
|
|
31 | 6 |
public void verify(PicoContainer container) { |
32 |
} |
|
33 |
} |
|
34 |
|
|