org.apache.avalon.framework.component
Class DefaultComponentSelector
java.lang.Object
|
+--org.apache.avalon.framework.component.DefaultComponentSelector
- All Implemented Interfaces:
- Component, ComponentSelector
- public class DefaultComponentSelector
- extends java.lang.Object
- implements ComponentSelector
This is the default implementation of the ComponentSelector
- Author:
- Berin Loritsch
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultComponentSelector
public DefaultComponentSelector()
select
public Component select(java.lang.Object hint)
throws ComponentException
- Select the desired component. It does not cascade, neither
should it.
- Specified by:
select
in interface ComponentSelector
- Parameters:
hint
- the hint to retrieve Component- Returns:
- the Component
- Throws:
ComponentException
- if an error occurs
hasComponent
public boolean hasComponent(java.lang.Object hint)
- Returns whether a Component exists or not
- Specified by:
hasComponent
in interface ComponentSelector
- Following copied from interface:
org.apache.avalon.framework.component.ComponentSelector
- Parameters:
role
- a string identifying the role to check.- Returns:
- True if the component exists, False if it does not.
release
public void release(Component component)
- Release component.
- Specified by:
release
in interface ComponentSelector
- Parameters:
component
- the component
put
public void put(java.lang.Object hint,
Component component)
- Populate the ComponentSelector.
getComponentMap
protected final java.util.Map getComponentMap()
- Helper method for subclasses to retrieve component map.
- Returns:
- the component map
makeReadOnly
public void makeReadOnly()
checkWriteable
protected final void checkWriteable()
throws java.lang.IllegalStateException
"Copyright © 2001 Apache Jakarta Project. All Rights Reserved."