org.picocontainer
public interface Parameter
Since: 1.0
See Also: (Object,Class,Parameter[]) a method on the
MutablePicoContainer interface which allows passing in of an array of Parameters.
org.picocontainer.defaults.ComponentParameter an implementation of this interface that allows you to specify the key
used for resolving the parameter.
org.picocontainer.defaults.ConstantParameter an implementation of this interface that allows you to specify a constant
that will be used for resolving the parameter.
Method Summary | |
---|---|
void | accept(PicoVisitor visitor)
Accepts a visitor for this Parameter. |
boolean | isResolvable(PicoContainer container, ComponentAdapter adapter, Class expectedType)
Check if the Parameter can statisfy the expected type using the container.
|
Object | resolveInstance(PicoContainer container, ComponentAdapter adapter, Class expectedType)
Retrieve the object from the Parameter that statisfies the expected type.
|
void | verify(PicoContainer container, ComponentAdapter adapter, Class expectedType)
Verify that the Parameter can statisfied the expected type using the container
|
Parameters: visitor the visitor.
Since: 1.1
Parameters: container the container from which dependencies are resolved. adapter the ComponentAdapter that is asking for the instance expectedType the required type
Returns: true
if the component parameter can be resolved.
Since: 1.1
Parameters: container the container from which dependencies are resolved. adapter the ComponentAdapter that is asking for the instance expectedType the type that the returned instance needs to match.
Returns: the instance or null
if no suitable instance can be found.
Throws: PicoInitializationException if a referenced component could not be instantiated.
Since: 1.1
Parameters: container the container from which dependencies are resolved. adapter the ComponentAdapter that is asking for the verification expectedType the required type
Throws: PicoIntrospectionException if parameter and its dependencies cannot be resolved
Since: 1.1