|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
a method on the {@link
MutablePicoContainer} interface which allows passing in of an array of Parameter
s.
,
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 | |
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 |
Method Detail |
public Object resolveInstance(PicoContainer container, ComponentAdapter adapter, Class expectedType) throws PicoInitializationException
container
- the container from which dependencies are resolved.adapter
- the ComponentAdapter that is asking for the instanceexpectedType
- the type that the returned instance needs to match.
null
if no suitable instance can be found.
PicoInitializationException
- if a referenced component could not be instantiated.public boolean isResolvable(PicoContainer container, ComponentAdapter adapter, Class expectedType)
container
- the container from which dependencies are resolved.adapter
- the container that should be searchedexpectedType
- the required type
true
if the component parameter can be resolved.public void verify(PicoContainer container, ComponentAdapter adapter, Class expectedType) throws PicoIntrospectionException
container
- the container from which dependencies are resolved.adapter
- the container that should be searchedexpectedType
- the required type
PicoIntrospectionException
- if parameter and its dependencies cannot be resolvedpublic void accept(PicoVisitor visitor)
ComponentAdapter
, that
cascades the visitor also down to all its Parameters.
visitor
- the visitor.
|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |