org.picocontainer.defaults
Class ConstantParameter
java.lang.Object
org.picocontainer.defaults.ConstantParameter
- All Implemented Interfaces:
- Parameter, Serializable
- public class ConstantParameter
- extends Object
- implements Parameter, Serializable
A ConstantParameter should be used to pass in "constant" arguments
to constructors. This includes String
s, Integer
s or
any other object that is not registered in the container.
- Version:
- $Revision: 1.19 $
- Author:
- Jon Tirsén, Aslak Hellesøy, Jörg Schaible
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConstantParameter
public ConstantParameter(Object value)
resolveAdapter
public ComponentAdapter resolveAdapter(PicoContainer picoContainer,
Class expectedType)
throws AssignabilityRegistrationException,
NotConcreteRegistrationException
- Description copied from interface:
Parameter
- Retrieve the component adapter that should be used to find the instance to be passed in for this parameter.
- Specified by:
resolveAdapter
in interface 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.
- Throws:
AssignabilityRegistrationException
NotConcreteRegistrationException
Copyright © 2003-2004 Codehaus. All Rights Reserved.