Package org.codehaus.plexus
Class DefaultPlexusContainer
java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.codehaus.plexus.DefaultPlexusContainer
- All Implemented Interfaces:
LogEnabled
,MutablePlexusContainer
,PlexusContainer
Default implementation of PlexusContainer and MutablePlexusContainer.
- Author:
- Jason van Zyl, Kenney Westerhof
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.codehaus.plexus.classworlds.ClassWorld
protected ComponentDiscovererManager
Simple index (registry) of ComponentDiscovers and ComponentDiscoveryListener.protected ComponentFactoryManager
Trivial class to look-up ComponentFactory instances in this container.protected PlexusConfiguration
protected Reader
protected ConfigurationSource
Converts a ComponentDescriptor into PlexusConfiguration.protected Context
Arbitrary data associated with the container.protected org.codehaus.plexus.classworlds.realm.ClassRealm
protected static final String
protected static final String
protected LoggerManager
Generic logger interface.Fields inherited from interface org.codehaus.plexus.PlexusContainer
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addComponent
(Object component, String role) void
addComponent
(Object component, String role, String roleHint) <T> void
addComponent
(T component, Class<?> role, String roleHint) Adds live component instance to this container.void
addComponentDescriptor
(ComponentDescriptor<?> componentDescriptor) Adds a component descriptor to this container. componentDescriptor should have realmId set.void
addContextValue
(Object key, Object value) Add a key/value pair to this container's Context.org.codehaus.plexus.classworlds.realm.ClassRealm
discoverComponents
(org.codehaus.plexus.classworlds.realm.ClassRealm realm) Discovers components in the given realm.discoverComponents
(org.codehaus.plexus.classworlds.realm.ClassRealm realm, Object data) Discovers components in the given realm.void
dispose()
Disposes of this container, which in turn disposes all of it's components.org.codehaus.plexus.classworlds.ClassWorld
<T> ComponentDescriptor<T>
getComponentDescriptor
(Class<T> type, String role, String roleHint) Returns the ComponentDescriptor with the given component role and hint.getComponentDescriptor
(String role) Returns the ComponentDescriptor with the given component role and the default role hint.getComponentDescriptor
(String role, String roleHint) Returns the ComponentDescriptor with the given component role and hint.<T> List<ComponentDescriptor<T>>
getComponentDescriptorList
(Class<T> type, String role) Returns a List of ComponentDescriptors with the given role.Returns a List of ComponentDescriptors with the given role.<T> Map<String,
ComponentDescriptor<T>> getComponentDescriptorMap
(Class<T> type, String role) Returns a Map of ComponentDescriptors with the given role, keyed by role-hint.Returns a Map of ComponentDescriptors with the given role, keyed by role-hint.org.codehaus.plexus.classworlds.realm.ClassRealm
getComponentRealm
(String realmId) org.codehaus.plexus.classworlds.realm.ClassRealm
Returns the Classworld's ClassRealm of this Container, which acts as the default parent for all contained components.Returns this container's context.protected Reader
org.codehaus.plexus.classworlds.realm.ClassRealm
Returns the lookup realm for this container, which is either the container realm or the realm set byPlexusContainer.setLookupRealm(ClassRealm)
.org.codehaus.plexus.classworlds.realm.ClassRealm
getLookupRealm
(Object component) Utility method to get a default lookup realm for a component.boolean
hasComponent
(Class<?> type) Returns true if this container has a component with the given role/role-hint.boolean
hasComponent
(Class<?> type, String roleHint) Returns true if this container has a component with the given role/role-hint.boolean
hasComponent
(Class<?> type, String role, String roleHint) Returns true if this container has a component with the given role/role-hint.boolean
hasComponent
(String role) Returns true if this container has the keyed component.boolean
hasComponent
(String role, String roleHint) Returns true if this container has a component with the given role/role-hint.protected void
initialize
(ContainerConfiguration containerConfiguration) protected void
protected void
initializePhases
(ContainerConfiguration containerConfiguration) <T> T
Looks up and returns a component object with the given unique key or role.<T> T
Looks up and returns a component object with the given unique role/role-hint combination.<T> T
Looks up and returns a component object with the given unique role/role-hint combination.Looks up and returns a component object with the given unique key or role.Looks up and returns a component object with the given unique role/role-hint combination.<T> T
lookup
(ComponentDescriptor<T> componentDescriptor) Looks up and returns a component object matching the given component descriptor.<T> List<T>
lookupList
(Class<T> type) Looks up and returns a List of component objects with the given role.<T> List<T>
lookupList
(Class<T> type, List<String> roleHints) Looks up and returns a List of component objects with the given role.lookupList
(String role) Looks up and returns a List of component objects with the given role.lookupList
(String role, List<String> roleHints) Looks up and returns a List of component objects with the given role.Looks up and returns a Map of component objects with the given role, keyed by all available role-hints.Looks up and returns a Map of component objects with the given role, keyed by all available role-hints.Looks up and returns a Map of component objects with the given role, keyed by all available role-hints.Looks up and returns a Map of component objects with the given role, keyed by all available role-hints.void
Adds the listener to this container.void
Releases the component from the container.void
releaseAll
(List<?> components) Releases all Listed components from the container.void
releaseAll
(Map<String, ?> components) Releases all Mapped component values from the container.void
Removes the listener from this container.void
removeComponentRealm
(org.codehaus.plexus.classworlds.realm.ClassRealm realm) Dissociate the realm with the specified id from the container.void
setClassWorld
(org.codehaus.plexus.classworlds.ClassWorld classWorld) void
setComponentDiscovererManager
(ComponentDiscovererManager componentDiscovererManager) void
setComponentFactoryManager
(ComponentFactoryManager componentFactoryManager) void
setComponentRegistry
(ComponentRegistry componentRegistry) void
setConfiguration
(PlexusConfiguration configuration) void
setConfigurationSource
(ConfigurationSource configurationSource) void
setContainerRealm
(org.codehaus.plexus.classworlds.realm.ClassRealm containerRealm) void
setLoggerManager
(LoggerManager loggerManager) org.codehaus.plexus.classworlds.realm.ClassRealm
setLookupRealm
(org.codehaus.plexus.classworlds.realm.ClassRealm realm) Sets the lookup realm to use for lookup calls that don't have a ClassRealm parameter.protected void
start()
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, setupLogger, setupLogger, setupLogger
-
Field Details
-
DEFAULT_CONTAINER_NAME
- See Also:
-
DEFAULT_REALM_NAME
- See Also:
-
containerContext
Arbitrary data associated with the container. Data in the container has highest precedence when configuring a component to create. -
configuration
-
configurationReader
-
classWorld
protected org.codehaus.plexus.classworlds.ClassWorld classWorld -
containerRealm
protected org.codehaus.plexus.classworlds.realm.ClassRealm containerRealm -
componentDiscovererManager
Simple index (registry) of ComponentDiscovers and ComponentDiscoveryListener. -
componentFactoryManager
Trivial class to look-up ComponentFactory instances in this container. -
loggerManager
Generic logger interface. -
configurationSource
Converts a ComponentDescriptor into PlexusConfiguration.
-
-
Constructor Details
-
DefaultPlexusContainer
- Throws:
PlexusContainerException
-
DefaultPlexusContainer
- Throws:
PlexusContainerException
-
-
Method Details
-
addComponent
- Specified by:
addComponent
in interfacePlexusContainer
-
addComponent
Description copied from interface:PlexusContainer
Adds live component instance to this container. Component instance is not associated with any class realm and will be ignored during lookup is lookup realm is provided using thread context classloader.- Specified by:
addComponent
in interfacePlexusContainer
- Type Parameters:
T
- The type.- Parameters:
component
- The component.role
- The role.roleHint
- The hint.
-
addComponent
-
setLookupRealm
public org.codehaus.plexus.classworlds.realm.ClassRealm setLookupRealm(org.codehaus.plexus.classworlds.realm.ClassRealm realm) Description copied from interface:PlexusContainer
Sets the lookup realm to use for lookup calls that don't have a ClassRealm parameter.- Specified by:
setLookupRealm
in interfacePlexusContainer
- Parameters:
realm
- the new realm to use.- Returns:
- The previous lookup realm. It is advised to set it back once the old-style lookups have completed.
-
getLookupRealm
public org.codehaus.plexus.classworlds.realm.ClassRealm getLookupRealm()Description copied from interface:PlexusContainer
Returns the lookup realm for this container, which is either the container realm or the realm set byPlexusContainer.setLookupRealm(ClassRealm)
.- Specified by:
getLookupRealm
in interfacePlexusContainer
- Returns:
ClassRealm
-
createChildRealm
- Specified by:
createChildRealm
in interfacePlexusContainer
-
lookup
Description copied from interface:PlexusContainer
Looks up and returns a component object with the given unique key or role.- Specified by:
lookup
in interfacePlexusContainer
- Parameters:
role
- a unique key for the desired component- Returns:
- a Plexus component object
- Throws:
ComponentLookupException
- in case of lookup error.
-
lookup
Description copied from interface:PlexusContainer
Looks up and returns a component object with the given unique role/role-hint combination.- Specified by:
lookup
in interfacePlexusContainer
- Parameters:
role
- a non-unique key for the desired componentroleHint
- a hint for the desired component implementation- Returns:
- a Plexus component object
- Throws:
ComponentLookupException
- in case of lookup error.
-
lookup
Description copied from interface:PlexusContainer
Looks up and returns a component object with the given unique key or role.- Specified by:
lookup
in interfacePlexusContainer
- Type Parameters:
T
- The type.- Parameters:
type
- the unique type of the component within the container- Returns:
- a Plexus component object
- Throws:
ComponentLookupException
- in case of lookup error.
-
lookup
Description copied from interface:PlexusContainer
Looks up and returns a component object with the given unique role/role-hint combination.- Specified by:
lookup
in interfacePlexusContainer
- Type Parameters:
T
- The type.- Parameters:
type
- the non-unique type of the componentroleHint
- a hint for the desired component implementation- Returns:
- a Plexus component object
- Throws:
ComponentLookupException
- in case of lookup error.
-
lookup
Description copied from interface:PlexusContainer
Looks up and returns a component object with the given unique role/role-hint combination.- Specified by:
lookup
in interfacePlexusContainer
- Type Parameters:
T
- The type.- Parameters:
type
- the non-unique type of the componentrole
- a non-unique key for the desired componentroleHint
- a hint for the desired component implementation- Returns:
- a Plexus component object
- Throws:
ComponentLookupException
- in case of lookup error.
-
lookup
Description copied from interface:PlexusContainer
Looks up and returns a component object matching the given component descriptor.- Specified by:
lookup
in interfacePlexusContainer
- Type Parameters:
T
- The type.- Parameters:
componentDescriptor
- the descriptor of the component- Returns:
- a Plexus component object
- Throws:
ComponentLookupException
- in case of lookup error.
-
lookupList
Description copied from interface:PlexusContainer
Looks up and returns a List of component objects with the given role.- Specified by:
lookupList
in interfacePlexusContainer
- Parameters:
role
- a non-unique key for the desired components- Returns:
- a List of component objects
- Throws:
ComponentLookupException
- in case of lookup error.
-
lookupList
Description copied from interface:PlexusContainer
Looks up and returns a List of component objects with the given role.- Specified by:
lookupList
in interfacePlexusContainer
- Parameters:
role
- a non-unique key for the desired componentsroleHints
- the list of hints.- Returns:
- a List of component objects
- Throws:
ComponentLookupException
- in case of lookup error.
-
lookupList
Description copied from interface:PlexusContainer
Looks up and returns a List of component objects with the given role.- Specified by:
lookupList
in interfacePlexusContainer
- Type Parameters:
T
- The type.- Parameters:
type
- the non-unique type of the components- Returns:
- a List of component objects
- Throws:
ComponentLookupException
- in case of lookup error.
-
lookupList
public <T> List<T> lookupList(Class<T> type, List<String> roleHints) throws ComponentLookupException Description copied from interface:PlexusContainer
Looks up and returns a List of component objects with the given role.- Specified by:
lookupList
in interfacePlexusContainer
- Type Parameters:
T
- The type.- Parameters:
type
- the non-unique type of the componentsroleHints
- the list of hints.- Returns:
- a List of component objects
- Throws:
ComponentLookupException
- in case of lookup error.
-
lookupMap
Description copied from interface:PlexusContainer
Looks up and returns a Map of component objects with the given role, keyed by all available role-hints.- Specified by:
lookupMap
in interfacePlexusContainer
- Parameters:
role
- a non-unique key for the desired components- Returns:
- a Map of component objects
- Throws:
ComponentLookupException
- in case of lookup error.
-
lookupMap
public Map<String,Object> lookupMap(String role, List<String> roleHints) throws ComponentLookupException Description copied from interface:PlexusContainer
Looks up and returns a Map of component objects with the given role, keyed by all available role-hints.- Specified by:
lookupMap
in interfacePlexusContainer
- Parameters:
role
- a non-unique key for the desired componentsroleHints
- the list of hints.- Returns:
- a Map of component objects
- Throws:
ComponentLookupException
- in case of lookup error.
-
lookupMap
Description copied from interface:PlexusContainer
Looks up and returns a Map of component objects with the given role, keyed by all available role-hints.- Specified by:
lookupMap
in interfacePlexusContainer
- Type Parameters:
T
- The type.- Parameters:
type
- the non-unique type of the components- Returns:
- a Map of component objects
- Throws:
ComponentLookupException
- in case of lookup error.
-
lookupMap
public <T> Map<String,T> lookupMap(Class<T> type, List<String> roleHints) throws ComponentLookupException Description copied from interface:PlexusContainer
Looks up and returns a Map of component objects with the given role, keyed by all available role-hints.- Specified by:
lookupMap
in interfacePlexusContainer
- Type Parameters:
T
- The type.- Parameters:
type
- the non-unique type of the componentsroleHints
- the list of hints.- Returns:
- a Map of component objects
- Throws:
ComponentLookupException
- in case of lookup error.
-
hasComponent
Description copied from interface:PlexusContainer
Returns true if this container has the keyed component.- Specified by:
hasComponent
in interfacePlexusContainer
- Parameters:
role
- a non-unique key for the desired component- Returns:
- true if this container has the keyed component
-
hasComponent
Description copied from interface:PlexusContainer
Returns true if this container has a component with the given role/role-hint.- Specified by:
hasComponent
in interfacePlexusContainer
- Parameters:
role
- a non-unique key for the desired componentroleHint
- a hint for the desired component implementation- Returns:
- true if this container has a component with the given role/role-hint
-
hasComponent
Description copied from interface:PlexusContainer
Returns true if this container has a component with the given role/role-hint.- Specified by:
hasComponent
in interfacePlexusContainer
- Parameters:
type
- the non-unique type of the component- Returns:
- true if this container has a component with the given role/role-hint
-
hasComponent
Description copied from interface:PlexusContainer
Returns true if this container has a component with the given role/role-hint.- Specified by:
hasComponent
in interfacePlexusContainer
- Parameters:
type
- the non-unique type of the componentroleHint
- a hint for the desired component implementation- Returns:
- true if this container has a component with the given role/role-hint
-
hasComponent
Description copied from interface:PlexusContainer
Returns true if this container has a component with the given role/role-hint.- Specified by:
hasComponent
in interfacePlexusContainer
- Parameters:
type
- the non-unique type of the componentrole
- a non-unique key for the desired componentroleHint
- a hint for the desired component implementation- Returns:
- true if this container has a component with the given role/role-hint
-
getComponentDescriptor
Description copied from interface:PlexusContainer
Returns the ComponentDescriptor with the given component role and the default role hint. Searches up the hierarchy until one is found, null if none is found.- Specified by:
getComponentDescriptor
in interfacePlexusContainer
- Parameters:
role
- a unique role for the desired component's descriptor- Returns:
- the ComponentDescriptor with the given component role
-
getComponentDescriptor
Description copied from interface:PlexusContainer
Returns the ComponentDescriptor with the given component role and hint. Searches up the hierarchy until one is found, null if none is found.- Specified by:
getComponentDescriptor
in interfacePlexusContainer
- Parameters:
role
- a unique role for the desired component's descriptorroleHint
- a hint showing which implementation should be used- Returns:
- the ComponentDescriptor with the given component role
-
getComponentDescriptor
public <T> ComponentDescriptor<T> getComponentDescriptor(Class<T> type, String role, String roleHint) Description copied from interface:PlexusContainer
Returns the ComponentDescriptor with the given component role and hint. Searches up the hierarchy until one is found, null if none is found.- Specified by:
getComponentDescriptor
in interfacePlexusContainer
- Type Parameters:
T
- The type.- Parameters:
type
- the Java type of the desired componentrole
- a unique role for the desired component's descriptorroleHint
- a hint showing which implementation should be used- Returns:
- the ComponentDescriptor with the given component role
-
getComponentDescriptorMap
Description copied from interface:PlexusContainer
Returns a Map of ComponentDescriptors with the given role, keyed by role-hint. Searches up the hierarchy until all are found, an empty Map if none are found.- Specified by:
getComponentDescriptorMap
in interfacePlexusContainer
- Parameters:
role
- a non-unique key for the desired components- Returns:
- a Map of component descriptors keyed by role-hint
-
getComponentDescriptorMap
Description copied from interface:PlexusContainer
Returns a Map of ComponentDescriptors with the given role, keyed by role-hint. Searches up the hierarchy until all are found, an empty Map if none are found.- Specified by:
getComponentDescriptorMap
in interfacePlexusContainer
- Type Parameters:
T
- The type.- Parameters:
type
- the Java type of the desired componentsrole
- a non-unique key for the desired components- Returns:
- a Map of component descriptors keyed by role-hint
-
getComponentDescriptorList
Description copied from interface:PlexusContainer
Returns a List of ComponentDescriptors with the given role. Searches up the hierarchy until all are found, an empty List if none are found.- Specified by:
getComponentDescriptorList
in interfacePlexusContainer
- Parameters:
role
- a non-unique key for the desired components- Returns:
- a List of component descriptors
-
getComponentDescriptorList
Description copied from interface:PlexusContainer
Returns a List of ComponentDescriptors with the given role. Searches up the hierarchy until all are found, an empty List if none are found.- Specified by:
getComponentDescriptorList
in interfacePlexusContainer
- Type Parameters:
T
- The type.- Parameters:
type
- the Java type of the desired componentsrole
- a non-unique key for the desired components- Returns:
- a List of component descriptors
-
addComponentDescriptor
public void addComponentDescriptor(ComponentDescriptor<?> componentDescriptor) throws CycleDetectedInComponentGraphException Description copied from interface:PlexusContainer
Adds a component descriptor to this container. componentDescriptor should have realmId set.- Specified by:
addComponentDescriptor
in interfacePlexusContainer
- Parameters:
componentDescriptor
-ComponentDescriptor
- Throws:
CycleDetectedInComponentGraphException
- In case of an error.
-
release
Description copied from interface:PlexusContainer
Releases the component from the container. This is dependent upon how the implementation manages the component, but usually enacts some standard lifecycle shutdown procedure on the component. In every case, the component is no longer accessible from the container (unless another is created).- Specified by:
release
in interfacePlexusContainer
- Parameters:
component
- the plexus component object to release- Throws:
ComponentLifecycleException
- in case of an error.
-
releaseAll
Description copied from interface:PlexusContainer
Releases all Mapped component values from the container.- Specified by:
releaseAll
in interfacePlexusContainer
- Parameters:
components
- Map of plexus component objects to release- Throws:
ComponentLifecycleException
- in case of an error.- See Also:
-
releaseAll
Description copied from interface:PlexusContainer
Releases all Listed components from the container.- Specified by:
releaseAll
in interfacePlexusContainer
- Parameters:
components
- List of plexus component objects to release- Throws:
ComponentLifecycleException
- in case of an error.- See Also:
-
initialize
protected void initialize(ContainerConfiguration containerConfiguration) throws PlexusContainerException - Throws:
PlexusContainerException
-
initializePhases
protected void initializePhases(ContainerConfiguration containerConfiguration) throws PlexusContainerException - Throws:
PlexusContainerException
-
start
- Throws:
PlexusContainerException
-
dispose
public void dispose()Description copied from interface:PlexusContainer
Disposes of this container, which in turn disposes all of it's components. This container should also remove itself from the container hierarchy.- Specified by:
dispose
in interfacePlexusContainer
-
addContextValue
Description copied from interface:PlexusContainer
Add a key/value pair to this container's Context.- Specified by:
addContextValue
in interfacePlexusContainer
- Parameters:
key
- any unique object valid to the Context's implementationvalue
- any object valid to the Context's implementation
-
getClassWorld
public org.codehaus.plexus.classworlds.ClassWorld getClassWorld()- Specified by:
getClassWorld
in interfaceMutablePlexusContainer
-
setClassWorld
public void setClassWorld(org.codehaus.plexus.classworlds.ClassWorld classWorld) -
getContainerRealm
public org.codehaus.plexus.classworlds.realm.ClassRealm getContainerRealm()Description copied from interface:PlexusContainer
Returns the Classworld's ClassRealm of this Container, which acts as the default parent for all contained components.- Specified by:
getContainerRealm
in interfacePlexusContainer
- Returns:
- the ClassRealm of this Container
-
setContainerRealm
public void setContainerRealm(org.codehaus.plexus.classworlds.realm.ClassRealm containerRealm) -
getContext
Description copied from interface:PlexusContainer
Returns this container's context. A Context is a simple data store used to hold values which may alter the execution of the Container.- Specified by:
getContext
in interfacePlexusContainer
- Returns:
- this container's context.
-
initializeConfiguration
protected void initializeConfiguration(ContainerConfiguration c) throws PlexusConfigurationException, ContextException, IOException -
getInterpolationConfigurationReader
-
getLogger
- Specified by:
getLogger
in interfaceMutablePlexusContainer
- Overrides:
getLogger
in classAbstractLogEnabled
-
registerComponentDiscoveryListener
Description copied from interface:PlexusContainer
Adds the listener to this container. ComponentDiscoveryListeners have the ability to respond to various ComponentDiscoverer events.- Specified by:
registerComponentDiscoveryListener
in interfacePlexusContainer
- Parameters:
listener
- A listener which responds to different ComponentDiscoveryEvents
-
removeComponentDiscoveryListener
Description copied from interface:PlexusContainer
Removes the listener from this container.- Specified by:
removeComponentDiscoveryListener
in interfacePlexusContainer
- Parameters:
listener
- A listener to remove
-
getComponentRegistry
- Specified by:
getComponentRegistry
in interfaceMutablePlexusContainer
-
setComponentRegistry
- Specified by:
setComponentRegistry
in interfaceMutablePlexusContainer
-
getComponentDiscovererManager
- Specified by:
getComponentDiscovererManager
in interfaceMutablePlexusContainer
-
setComponentDiscovererManager
- Specified by:
setComponentDiscovererManager
in interfaceMutablePlexusContainer
-
getComponentFactoryManager
- Specified by:
getComponentFactoryManager
in interfaceMutablePlexusContainer
-
setComponentFactoryManager
- Specified by:
setComponentFactoryManager
in interfaceMutablePlexusContainer
-
getConfiguration
- Specified by:
getConfiguration
in interfaceMutablePlexusContainer
-
setConfiguration
- Specified by:
setConfiguration
in interfaceMutablePlexusContainer
-
getComponentRealm
- Specified by:
getComponentRealm
in interfaceMutablePlexusContainer
- Specified by:
getComponentRealm
in interfacePlexusContainer
-
removeComponentRealm
public void removeComponentRealm(org.codehaus.plexus.classworlds.realm.ClassRealm realm) throws PlexusContainerException Description copied from interface:PlexusContainer
Dissociate the realm with the specified id from the container. This will remove all components contained in the realm from the component repository.- Specified by:
removeComponentRealm
in interfacePlexusContainer
- Parameters:
realm
- Realm to remove from the container.- Throws:
PlexusContainerException
-PlexusContainerException
.
-
getLookupRealm
Utility method to get a default lookup realm for a component.- Specified by:
getLookupRealm
in interfacePlexusContainer
- Parameters:
component
- The component.- Returns:
ClassRealm
-
setConfigurationSource
- Specified by:
setConfigurationSource
in interfaceMutablePlexusContainer
-
getConfigurationSource
- Specified by:
getConfigurationSource
in interfaceMutablePlexusContainer
-
getLoggerManager
- Specified by:
getLoggerManager
in interfaceMutablePlexusContainer
-
setLoggerManager
- Specified by:
setLoggerManager
in interfaceMutablePlexusContainer
-
discoverComponents
public List<ComponentDescriptor<?>> discoverComponents(org.codehaus.plexus.classworlds.realm.ClassRealm realm) throws PlexusConfigurationException, CycleDetectedInComponentGraphException Description copied from interface:PlexusContainer
Discovers components in the given realm.- Specified by:
discoverComponents
in interfacePlexusContainer
- Parameters:
realm
-ClassRealm
- Returns:
- list
ComponentDescriptor
- Throws:
PlexusConfigurationException
- in case of an error.CycleDetectedInComponentGraphException
- in case of an error.
-
discoverComponents
public List<ComponentDescriptor<?>> discoverComponents(org.codehaus.plexus.classworlds.realm.ClassRealm realm, Object data) throws PlexusConfigurationException, CycleDetectedInComponentGraphException Description copied from interface:PlexusContainer
Discovers components in the given realm.- Specified by:
discoverComponents
in interfacePlexusContainer
- Parameters:
realm
- theClassRealm
.data
- The data.- Returns:
- list
ComponentDescriptor
- Throws:
PlexusConfigurationException
- in case of an error.CycleDetectedInComponentGraphException
- in case of an error.
-