|
|||||||||||||||||||
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 | |||||||||||||||
ConstantParameter.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 |
* Idea by Rachel Davies, Original code by Jon Tirsen *
|
|
9 |
*****************************************************************************/
|
|
10 |
|
|
11 |
package org.picocontainer.internals;
|
|
12 |
|
|
13 |
import org.picocontainer.PicoInstantiationException;
|
|
14 |
|
|
15 |
/**
|
|
16 |
* @author Jon Tirsen (tirsen@codehaus.org)
|
|
17 |
* @version $Revision: 1.1 $
|
|
18 |
*/
|
|
19 |
public class ConstantParameter implements Parameter { |
|
20 |
private Object arg;
|
|
21 |
|
|
22 | 9 |
public ConstantParameter(Object parameter) {
|
23 | 9 |
this.arg = parameter;
|
24 |
} |
|
25 |
|
|
26 | 9 |
public Object resolve(ComponentRegistry componentRegistry, ComponentSpecification compSpec, Class targetType) throws PicoInstantiationException { |
27 | 9 |
return arg;
|
28 |
} |
|
29 |
} |
|
30 |
|
|