View Javadoc
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 Aslak Hellesoy and Paul Hammant * 9 *****************************************************************************/ 10 11 package picocontainer; 12 13 public interface ClassRegistrationPicoContainer extends PicoContainer { 14 15 /*** 16 * Registers a component. Same as calling {@link #registerComponent(java.lang.Class, java.lang.Class)} 17 * with the same argument. 18 * 19 * @param componentImplementation The class of the component to instantiate 20 * @throws PicoRegistrationException If a registration problem 21 */ 22 void registerComponent(Class componentImplementation) 23 throws PicoRegistrationException; 24 25 /*** 26 * Alternate way of registering components with additional 27 * component type. 28 * 29 * @param componentType Component type 30 * @param componentImplementation The class of the component to instantiate 31 * @throws PicoRegistrationException If a registration problem 32 */ 33 void registerComponent(Class componentType, Class componentImplementation) 34 throws PicoRegistrationException; 35 36 /*** 37 * Registers a component that is instantiated and configured outside 38 * the container. Useful in cases where pico doesn't have sufficient 39 * knowledge to instantiate a component. 40 * 41 * @param componentType Component type 42 * @param component preinstantiated component 43 * @throws PicoRegistrationException If a registration problem 44 */ 45 void registerComponent(Class componentType, Object component) 46 throws PicoRegistrationException; 47 48 /*** 49 * Registers an instantiated component. This might be because you are 50 * creating trees of Pico containers or if you have a class that you want treated 51 * as a component, but is not Pico component compatible. 52 * @param component The pre instantiated component to register 53 * @throws PicoRegistrationException 54 */ 55 void registerComponent(Object component) 56 throws PicoRegistrationException; 57 58 /*** 59 * Add a parameter to a component. Used for configuring them. 60 * Very liekly to change before release. 61 * @param componentType The component type 62 * @param parameter The parameter it pertains to 63 * @param arg The argukemt to pass in. 64 */ 65 void addParameterToComponent(Class componentType, Class parameter, Object arg); 66 67 }

This page was automatically generated by Maven