|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.picocontainer.defaults.ComponentParameter
A ComponentParameter should be used to pass in a particular component as argument to a different component's constructor. This is particularly useful in cases where several components of the same type have been registered, but with a different key. Passing a ComponentParameter as a parameter when registering a component will give PicoContainer a hint about what other component to use in the constructor.
Constructor Summary | |
ComponentParameter()
Expect a parameter any paramter of the appropriate type. |
|
ComponentParameter(java.lang.Class componentType)
Deprecated. Use the empty constructor instead. |
|
ComponentParameter(java.lang.Object componentKey)
Expect a parameter matching a component of a specific key. |
Method Summary | |
ComponentAdapter |
resolveAdapter(PicoContainer picoContainer,
java.lang.Class expectedType)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ComponentParameter(java.lang.Object componentKey)
componentKey
- the key of the desired componentpublic ComponentParameter()
public ComponentParameter(java.lang.Class componentType)
Method Detail |
public ComponentAdapter resolveAdapter(PicoContainer picoContainer, java.lang.Class expectedType) throws PicoIntrospectionException
resolveAdapter
in interface Parameter
picoContainer
- the container where dependencies are resolved fromexpectedType
- the expected (dependant) type
PicoIntrospectionException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |