public abstract class Module extends Object
configure()
.
Several modules can be grouped together - install(Module)
, installChild(Module)
.
Constructor and Description |
---|
Module() |
Modifier and Type | Method and Description |
---|---|
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() |
public Module()
public final Module installChild(Module child)
public final void uninstallChild()
protected void doStart()
protected void doStop()
protected abstract void configure()
addCoreSingleton(Object)
, addExtension(org.sonar.api.platform.PluginMetadata, Object)
or addAdapter(ComponentAdapter)
.protected final void addCoreSingleton(Object component)
protected final void declareExtension(PluginMetadata plugin, Object extension)
protected final void addExtension(PluginMetadata plugin, Object extension)
protected final void addAdapter(org.picocontainer.ComponentAdapter<?> componentAdapter)
public final <T> T getComponentByType(Class<T> componentType)
public final Object getComponentByKey(Object key)
public final <T> List<T> getComponents(Class<T> componentType)
Copyright © 2009-2012 SonarSource. All Rights Reserved.