org.sonar.api.platform
Class ComponentContainer
java.lang.Object
org.sonar.api.platform.ComponentContainer
- All Implemented Interfaces:
- BatchComponent, ServerComponent
public class ComponentContainer
- extends Object
- implements BatchComponent, ServerComponent
- Since:
- 2.12
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ComponentContainer
public ComponentContainer()
- Create root container
startComponents
public final ComponentContainer startComponents()
- This method MUST NOT be renamed start() because the container is registered itself in picocontainer. Starting
a component twice is not authorized.
stopComponents
public final ComponentContainer stopComponents()
- This method MUST NOT be renamed stop() because the container is registered itself in picocontainer. Starting
a component twice is not authorized.
addSingleton
public final ComponentContainer addSingleton(Object component)
addComponent
public final ComponentContainer addComponent(Object component,
boolean singleton)
- Parameters:
singleton
- return always the same instance if true, else a new instance
is returned each time the component is requested
addExtension
public final ComponentContainer addExtension(@Nullable
PluginMetadata plugin,
Object extension)
declareExtension
public final void declareExtension(@Nullable
PluginMetadata plugin,
Object extension)
addPicoAdapter
public final ComponentContainer addPicoAdapter(org.picocontainer.ComponentAdapter adapter)
getComponentByType
public final <T> T getComponentByType(Class<T> tClass)
getComponentByKey
public final Object getComponentByKey(Object key)
getComponentsByType
public final <T> List<T> getComponentsByType(Class<T> tClass)
removeChild
public final ComponentContainer removeChild()
createChild
public final ComponentContainer createChild()
getParent
public ComponentContainer getParent()
getChild
public ComponentContainer getChild()
getPicoContainer
public org.picocontainer.MutablePicoContainer getPicoContainer()
Copyright © 2009-2012 SonarSource. All Rights Reserved.