Class DefaultComponentSelector
java.lang.Object
org.apache.avalon.framework.component.DefaultComponentSelector
- All Implemented Interfaces:
Component,ComponentSelector
This is the default implementation of the ComponentSelector.
Deprecated:
Use DefaultServiceSelector instead.
- Version:
- CVS $Revision: 1.23 $ $Date: 2004/02/11 14:34:25 $
- Author:
- Avalon Development Team
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidCheck if this component m_manager is writeable.protected final MapHelper method for subclasses to retrieve component map.booleanhasComponent(Object hint) Returns whether a Component exists or notvoidMake this component selector read-only.voidPopulate the ComponentSelector.voidRelease component.Select the desired component.
-
Constructor Details
-
DefaultComponentSelector
public DefaultComponentSelector()
-
-
Method Details
-
select
Select the desired component. It does not cascade, neither should it.- Specified by:
selectin interfaceComponentSelector- Parameters:
hint- the hint to retrieve Component- Returns:
- the Component
- Throws:
ComponentException- if an error occurs
-
hasComponent
Returns whether a Component exists or not- Specified by:
hasComponentin interfaceComponentSelector- Parameters:
hint- the hint to retrieve Component- Returns:
trueif the Component exists
-
release
Release component.- Specified by:
releasein interfaceComponentSelector- Parameters:
component- the component
-
put
Populate the ComponentSelector.- Parameters:
hint- the hint to retrieve Componentcomponent- the component to add
-
getComponentMap
Helper method for subclasses to retrieve component map.- Returns:
- the component map
-
makeReadOnly
public void makeReadOnly()Make this component selector read-only. -
checkWriteable
Check if this component m_manager is writeable.- Throws:
IllegalStateException- if this component m_manager is read-only
-