|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.picocontainer.defaults.ConstantParameter
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.
Constructor Summary | |
ConstantParameter(Object value)
|
Method Summary | |
void |
accept(PicoVisitor visitor)
Visit the current 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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ConstantParameter(Object value)
Method Detail |
public Object resolveInstance(PicoContainer container, ComponentAdapter adapter, Class expectedType)
Parameter
resolveInstance
in interface Parameter
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.public boolean isResolvable(PicoContainer container, ComponentAdapter adapter, Class expectedType)
Parameter
isResolvable
in interface Parameter
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 PicoException
verify
in interface Parameter
container
- the container from which dependencies are resolved.adapter
- the container that should be searchedexpectedType
- the required type
PicoException
Parameter.verify(org.picocontainer.PicoContainer,
org.picocontainer.ComponentAdapter, java.lang.Class)
public void accept(PicoVisitor visitor)
Parameter
.
accept
in interface Parameter
visitor
- the visitor.Parameter.accept(org.picocontainer.PicoVisitor)
|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |