Package org.codehaus.plexus
Class DefaultComponentRegistry
- java.lang.Object
-
- org.codehaus.plexus.DefaultComponentRegistry
-
- All Implemented Interfaces:
ComponentRegistry
public class DefaultComponentRegistry extends Object implements ComponentRegistry
-
-
Constructor Summary
Constructors Constructor Description DefaultComponentRegistry(MutablePlexusContainer container, ComponentRepository repository, LifecycleHandlerManager lifecycleHandlerManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description <T> void
addComponent(T component, String role, String roleHint)
void
addComponentDescriptor(ComponentDescriptor<?> componentDescriptor)
void
dispose()
<T> ComponentDescriptor<T>
getComponentDescriptor(Class<T> type, String role, String roleHint)
ComponentDescriptor<?>
getComponentDescriptor(String role, String roleHint, org.codehaus.plexus.classworlds.realm.ClassRealm realm)
Deprecated.<T> List<ComponentDescriptor<T>>
getComponentDescriptorList(Class<T> type, String role)
<T> Map<String,ComponentDescriptor<T>>
getComponentDescriptorMap(Class<T> type, String role)
<T> T
lookup(Class<T> type, String role, String roleHint)
<T> T
lookup(ComponentDescriptor<T> componentDescriptor)
<T> List<T>
lookupList(Class<T> type, String role, List<String> roleHints)
<T> Map<String,T>
lookupMap(Class<T> type, String role, List<String> roleHints)
void
registerComponentManagerFactory(ComponentManagerFactory componentManagerFactory)
void
release(Object component)
void
removeComponentRealm(org.codehaus.plexus.classworlds.realm.ClassRealm classRealm)
-
-
-
Constructor Detail
-
DefaultComponentRegistry
public DefaultComponentRegistry(MutablePlexusContainer container, ComponentRepository repository, LifecycleHandlerManager lifecycleHandlerManager)
-
-
Method Detail
-
dispose
public void dispose()
- Specified by:
dispose
in interfaceComponentRegistry
-
registerComponentManagerFactory
public void registerComponentManagerFactory(ComponentManagerFactory componentManagerFactory)
- Specified by:
registerComponentManagerFactory
in interfaceComponentRegistry
-
addComponentDescriptor
public void addComponentDescriptor(ComponentDescriptor<?> componentDescriptor) throws CycleDetectedInComponentGraphException
- Specified by:
addComponentDescriptor
in interfaceComponentRegistry
- Throws:
CycleDetectedInComponentGraphException
-
addComponent
public <T> void addComponent(T component, String role, String roleHint)
- Specified by:
addComponent
in interfaceComponentRegistry
-
getComponentDescriptor
public <T> ComponentDescriptor<T> getComponentDescriptor(Class<T> type, String role, String roleHint)
- Specified by:
getComponentDescriptor
in interfaceComponentRegistry
-
getComponentDescriptor
@Deprecated public ComponentDescriptor<?> getComponentDescriptor(String role, String roleHint, org.codehaus.plexus.classworlds.realm.ClassRealm realm)
Deprecated.- Specified by:
getComponentDescriptor
in interfaceComponentRegistry
-
getComponentDescriptorMap
public <T> Map<String,ComponentDescriptor<T>> getComponentDescriptorMap(Class<T> type, String role)
- Specified by:
getComponentDescriptorMap
in interfaceComponentRegistry
-
getComponentDescriptorList
public <T> List<ComponentDescriptor<T>> getComponentDescriptorList(Class<T> type, String role)
- Specified by:
getComponentDescriptorList
in interfaceComponentRegistry
-
lookup
public <T> T lookup(Class<T> type, String role, String roleHint) throws ComponentLookupException
- Specified by:
lookup
in interfaceComponentRegistry
- Throws:
ComponentLookupException
-
lookup
public <T> T lookup(ComponentDescriptor<T> componentDescriptor) throws ComponentLookupException
- Specified by:
lookup
in interfaceComponentRegistry
- Throws:
ComponentLookupException
-
lookupMap
public <T> Map<String,T> lookupMap(Class<T> type, String role, List<String> roleHints) throws ComponentLookupException
- Specified by:
lookupMap
in interfaceComponentRegistry
- Throws:
ComponentLookupException
-
lookupList
public <T> List<T> lookupList(Class<T> type, String role, List<String> roleHints) throws ComponentLookupException
- Specified by:
lookupList
in interfaceComponentRegistry
- Throws:
ComponentLookupException
-
release
public void release(Object component) throws ComponentLifecycleException
- Specified by:
release
in interfaceComponentRegistry
- Throws:
ComponentLifecycleException
-
removeComponentRealm
public void removeComponentRealm(org.codehaus.plexus.classworlds.realm.ClassRealm classRealm) throws PlexusContainerException
- Specified by:
removeComponentRealm
in interfaceComponentRegistry
- Throws:
PlexusContainerException
-
-