org.sonar.batch.bootstrap
Class Module

java.lang.Object
  extended by org.sonar.batch.bootstrap.Module
Direct Known Subclasses:
BatchModule, BootstrapModule, ProjectModule

public abstract class Module
extends Object

Module describes group of components - configure(). Several modules can be grouped together - install(Module), installChild(Module).


Constructor Summary
Module()
           
 
Method Summary
protected  void addAdapter(org.picocontainer.ComponentAdapter<?> componentAdapter)
           
protected  void addCoreSingleton(Object component)
           
protected  void addExtension(PluginMetadata plugin, Object extension)
           
protected abstract  void configure()
          Implementation of this method must not contain conditional logic and just should contain several invocations of addCoreSingleton(Object), addExtension(org.sonar.api.platform.PluginMetadata, Object) or addAdapter(ComponentAdapter).
protected  void declareExtension(PluginMetadata plugin, Object extension)
           
protected  void doStart()
           
protected  void doStop()
           
 Object getComponentByKey(Object key)
           
<T> T
getComponentByType(Class<T> componentType)
           
<T> List<T>
getComponents(Class<T> componentType)
           
 Module init()
           
 Module install(Module module)
          Installs module into this module.
 Module installChild(Module child)
          Installs module into new scope - see http://picocontainer.org/scopes.html
 Module start()
           
 Module stop()
           
 void uninstallChild()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Module

public Module()
Method Detail

init

public final Module init()
Returns:
this

install

public final Module install(Module module)
Installs module into this module.

Returns:
this

installChild

public final Module installChild(Module child)
Installs module into new scope - see http://picocontainer.org/scopes.html

Returns:
installed module

uninstallChild

public final void uninstallChild()

start

public final Module start()
Returns:
this

doStart

protected void doStart()

stop

public final Module stop()
Returns:
this

doStop

protected void doStop()

configure

protected abstract void configure()
Implementation of this method must not contain conditional logic and just should contain several invocations of addCoreSingleton(Object), addExtension(org.sonar.api.platform.PluginMetadata, Object) or addAdapter(ComponentAdapter).


addCoreSingleton

protected final void addCoreSingleton(Object component)

declareExtension

protected final void declareExtension(PluginMetadata plugin,
                                      Object extension)

addExtension

protected final void addExtension(PluginMetadata plugin,
                                  Object extension)

addAdapter

protected final void addAdapter(org.picocontainer.ComponentAdapter<?> componentAdapter)

getComponentByType

public final <T> T getComponentByType(Class<T> componentType)

getComponentByKey

public final Object getComponentByKey(Object key)

getComponents

public final <T> List<T> getComponents(Class<T> componentType)


Copyright © 2009-2012 SonarSource. All Rights Reserved.