|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.picocontainer.defaults.AbstractPicoVisitor
org.picocontainer.defaults.TraversalCheckingVisitor
org.picocontainer.defaults.MethodCallingVisitor
A PicoVisitor implementation, that calls methods on the components of a specific type.
Constructor Summary | |
MethodCallingVisitor(Method method,
Class ofType,
Object[] arguments)
Construct a MethodCallingVisitor for standard methods visiting the component in instantiation order. |
|
MethodCallingVisitor(Method method,
Class ofType,
Object[] arguments,
boolean visitInInstantiationOrder)
Construct a MethodCallingVisitor for a method with arguments. |
Method Summary | |
protected Object[] |
getArguments()
|
protected Method |
getMethod()
|
protected Object |
invoke(Object target)
|
protected void |
invoke(Object[] targets)
|
Object |
traverse(Object node)
Entry point for the PicoVisitor traversal. |
void |
visitContainer(PicoContainer pico)
Visit a PicoContainer that has to accept the visitor. |
Methods inherited from class org.picocontainer.defaults.TraversalCheckingVisitor |
visitComponentAdapter, visitParameter |
Methods inherited from class org.picocontainer.defaults.AbstractPicoVisitor |
checkTraversal |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MethodCallingVisitor(Method method, Class ofType, Object[] arguments, boolean visitInInstantiationOrder)
method
- the Method
to invokeofType
- the type of the components, that will be invokedvisitInInstantiationOrder
- true
if components are visited in instantiation orderarguments
- the arguments for the method invocation (may be null
)
NullPointerException
- if method, or ofType is null
public MethodCallingVisitor(Method method, Class ofType, Object[] arguments)
method
- the method to invokeofType
- the type of the components, that will be invokedarguments
- the arguments for the method invocation (may be null
)
NullPointerException
- if method, or ofType is null
Method Detail |
public Object traverse(Object node)
PicoVisitor
PicoContainer
, ComponentAdapter
,
or Parameter
are valid.
traverse
in interface PicoVisitor
traverse
in class AbstractPicoVisitor
public void visitContainer(PicoContainer pico)
PicoVisitor
PicoContainer
that has to accept the visitor.
visitContainer
in interface PicoVisitor
visitContainer
in class TraversalCheckingVisitor
protected Method getMethod()
protected Object[] getArguments()
protected void invoke(Object[] targets)
protected Object invoke(Object target)
|
![]() |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |