org.picocontainer
Interface Parameter

All Known Implementing Classes:
ComponentParameter, ConstantParameter

public interface Parameter

This class provides control over the arguments that will be passed to a constructor. It can be used for finer control over what arguments are passed to a particular constructor.

Since:
1.0
Version:
$Revision: 1.15 $
Author:
Jon Tirsén, Aslak Hellesøy
See Also:
a method on the {@link MutablePicoContainer} interface which allows passing in of an array of Parameters., an implementation of this interface that allows you to specify the key used for resolving the parameter., an implementation of this interface that allows you to specify a constant that will be used for resolving the parameter.

Method Summary
 ComponentAdapter resolveAdapter(PicoContainer picoContainer, Class expectedType)
          Retrieve the component adapter that should be used to find the instance to be passed in for this parameter.
 

Method Detail

resolveAdapter

public ComponentAdapter resolveAdapter(PicoContainer picoContainer,
                                       Class expectedType)
Retrieve the component adapter that should be used to find the instance to be passed in for this parameter.

Parameters:
picoContainer - the container from which dependencies are resolved.
expectedType - the type that the returned adapter needs to provide.
Returns:
the component adapter that should be used to find the instance to be passed in for this parameter. Should return null if not suitable adapter can be found.


Copyright © 2003-2004 Codehaus. All Rights Reserved.