|
|||||||||||||||||||
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 | |||||||||||||||
ImplementationHidingComponentAdapterFactory.java | - | 60% | 50% | 55.6% |
|
1 |
package org.picocontainer.alternatives;
|
|
2 |
|
|
3 |
import org.picocontainer.ComponentAdapter;
|
|
4 |
import org.picocontainer.Parameter;
|
|
5 |
import org.picocontainer.PicoIntrospectionException;
|
|
6 |
import org.picocontainer.defaults.AssignabilityRegistrationException;
|
|
7 |
import org.picocontainer.defaults.ComponentAdapterFactory;
|
|
8 |
import org.picocontainer.defaults.DecoratingComponentAdapterFactory;
|
|
9 |
import org.picocontainer.defaults.NotConcreteRegistrationException;
|
|
10 |
|
|
11 |
/**
|
|
12 |
* @author Aslak Hellesøy
|
|
13 |
* @version $Revision: 1.1 $
|
|
14 |
*/
|
|
15 |
public class ImplementationHidingComponentAdapterFactory extends DecoratingComponentAdapterFactory { |
|
16 |
private final boolean strict; |
|
17 |
|
|
18 |
/**
|
|
19 |
* For serialisation only. Do not use this constructor explicitly.
|
|
20 |
*/
|
|
21 | 0 |
public ImplementationHidingComponentAdapterFactory() {
|
22 | 0 |
this(null); |
23 |
} |
|
24 |
|
|
25 | 84 |
public ImplementationHidingComponentAdapterFactory(ComponentAdapterFactory delegate, boolean strict) { |
26 | 84 |
super(delegate);
|
27 | 84 |
this.strict = strict;
|
28 |
} |
|
29 |
|
|
30 | 0 |
public ImplementationHidingComponentAdapterFactory(ComponentAdapterFactory delegate) {
|
31 | 0 |
this(delegate, true); |
32 |
} |
|
33 |
|
|
34 | 68 |
public ComponentAdapter createComponentAdapter(Object componentKey, Class componentImplementation, Parameter[] parameters) throws PicoIntrospectionException, AssignabilityRegistrationException, NotConcreteRegistrationException { |
35 | 68 |
return new ImplementationHidingComponentAdapter(super.createComponentAdapter(componentKey, componentImplementation, parameters), strict); |
36 |
} |
|
37 |
} |
|
38 |
|
|