|
|||||||||||||||||||
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 | |||||||||||||||
PicoContainer.java | - | - | - | - |
|
1 |
/*****************************************************************************
|
|
2 |
* Copyright (Cc) 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 Aslak Hellesoy and Paul Hammant *
|
|
9 |
*****************************************************************************/
|
|
10 |
|
|
11 |
package picocontainer;
|
|
12 |
|
|
13 |
/**
|
|
14 |
* PicoContainer - guaranteed to resolve the needs of components
|
|
15 |
* as it instantiates them.
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
public interface PicoContainer { |
|
19 |
|
|
20 |
/**
|
|
21 |
* Does the container have a partilcilar component type?
|
|
22 |
* @param componentType The component type to look for.
|
|
23 |
* @return true if it does have the component type
|
|
24 |
*/
|
|
25 |
boolean hasComponent(Class componentType);
|
|
26 |
|
|
27 |
/**
|
|
28 |
* Get a component for a component type.
|
|
29 |
* @param componentType The component type to look for.
|
|
30 |
* @return the component, or null of no such component.
|
|
31 |
*/
|
|
32 |
Object getComponent(Class componentType); |
|
33 |
|
|
34 |
/**
|
|
35 |
* Get all components (random order).
|
|
36 |
* @return An array of components.
|
|
37 |
*/
|
|
38 |
Object[] getComponents(); |
|
39 |
|
|
40 |
/**
|
|
41 |
* Get all component types (random order).
|
|
42 |
* @return an array of component types.
|
|
43 |
*/
|
|
44 |
Class[] getComponentTypes(); |
|
45 |
|
|
46 |
/**
|
|
47 |
* Initialize the container.
|
|
48 |
*/
|
|
49 |
void instantiateComponents() throws PicoInstantiationException, PicoIntrospectionException; |
|
50 |
} |
|
51 |
|
|