|
|||||||||||||||||||
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 | |||||||||||||||
ObjectReference.java | - | - | - | - |
|
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 |
*****************************************************************************/
|
|
9 |
package org.picocontainer.defaults;
|
|
10 |
|
|
11 |
/**
|
|
12 |
* A way to refer to objects that are stored in "awkward" places (for example inside a
|
|
13 |
* <code>HttpSession</code> or {@link ThreadLocal}).
|
|
14 |
* <p/>
|
|
15 |
* This interface is typically implemented by someone integrating Pico into an existing container.
|
|
16 |
*
|
|
17 |
* @author <a href="mailto:joe@thoughtworks.net">Joe Walnes</a>
|
|
18 |
*/
|
|
19 |
public interface ObjectReference { |
|
20 |
/**
|
|
21 |
* Retrieve an actual reference to the object. Returns null if the reference is not available
|
|
22 |
* or has not been populated yet.
|
|
23 |
*
|
|
24 |
* @return an actual reference to the object.
|
|
25 |
*/
|
|
26 |
Object get(); |
|
27 |
|
|
28 |
/**
|
|
29 |
* Assign an object to the reference.
|
|
30 |
*
|
|
31 |
* @param item the object to assign to the reference. May be <code>null</code>.
|
|
32 |
*/
|
|
33 |
void set(Object item);
|
|
34 |
} |
|
35 |
|
|