Class ComposingMonitor

  extended by org.picocontainer.monitors.AbstractComponentMonitor
      extended by org.picocontainer.monitors.ComposingMonitor
All Implemented Interfaces:
Serializable, ComponentMonitor, ComponentMonitorStrategy

public class ComposingMonitor
extends AbstractComponentMonitor

The first of a list of composers passed in that responds with an instance for a missing component will be used.

See Also:
Serialized Form

Nested Class Summary
static interface ComposingMonitor.Composer
          A Composer can be used to make components that are otherwise missing.
Field Summary
Fields inherited from interface org.picocontainer.ComponentMonitor
Constructor Summary
ComposingMonitor(ComponentMonitor delegate, ComposingMonitor.Composer... composers)
ComposingMonitor(ComposingMonitor.Composer... composers)
Method Summary
 Object noComponentFound(MutablePicoContainer container, Object componentKey)
          No Component has been found for the key in question.
Methods inherited from class org.picocontainer.monitors.AbstractComponentMonitor
changeMonitor, currentMonitor, instantiated, instantiating, instantiationFailed, invocationFailed, invoked, invoking, lifecycleInvocationFailed, newBehavior, newInjector
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ComposingMonitor(ComponentMonitor delegate,
                        ComposingMonitor.Composer... composers)


public ComposingMonitor(ComposingMonitor.Composer... composers)
Method Detail


public Object noComponentFound(MutablePicoContainer container,
                               Object componentKey)
Description copied from interface: ComponentMonitor
No Component has been found for the key in question. Implementers of this have a last chance opportunity to specify something for the need. This is only relevant to component dependencies, and not to container.getComponent() in your user code.

Specified by:
noComponentFound in interface ComponentMonitor
noComponentFound in class AbstractComponentMonitor

Copyright © 2003-2010 Codehaus. All Rights Reserved.