|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ComponentMap
A map that is used to retrieve Component by key or type.
Codehaus.org.
| Method Summary | ||
|---|---|---|
boolean |
containsKey(java.lang.Object key)
Whether a Component with a certain key is contained in the map. |
|
boolean |
containsType(java.lang.Class type)
Whether a Component of a certain type or its sub-type is contained in the map. |
|
Component |
getComponent(java.lang.Object key)
Gets a Component identified by a key. |
|
|
getComponentOfType(java.lang.Class<T> type)
Gets a Component object of a certain type. |
|
java.util.Collection |
getComponents()
Gets all components stored in this map. |
|
|
getComponentsOfType(java.lang.Class<T> type)
Gets all component objects that are of a certain type. |
|
Dependency |
getDependency(java.lang.Object key,
ComponentMap cmap)
Gets the Dependency object for a component key. |
|
Dependency |
getDependencyOfType(java.lang.Class type,
ComponentMap cmap)
Gets the Dependency object for a component instance type. |
|
java.util.Set |
keys()
Get all the component keys. |
|
| Method Detail |
|---|
Component getComponent(java.lang.Object key)
key - the component key.
java.util.Set keys()
java.util.Collection getComponents()
<T> Component<T> getComponentOfType(java.lang.Class<T> type)
throws AmbiguousComponentResolutionException
type - the component instance type.
AmbiguousComponentResolutionExceptionboolean containsKey(java.lang.Object key)
key - the component key.
boolean containsType(java.lang.Class type)
type - the type of the component.
<T> java.util.List<Component<T>> getComponentsOfType(java.lang.Class<T> type)
type - the component instance type.
Dependency getDependency(java.lang.Object key,
ComponentMap cmap)
key - The component key.cmap - The ComponentMap object from which the parts of
the component should be obtained.
This parameter is typically passed as 'this' so that the parts are
created in the same container.
When implementing container interaction such as inheritance,
this parameter may be passed as a different ComponentMap object.
Dependency getDependencyOfType(java.lang.Class type,
ComponentMap cmap)
type - The component instance type.cmap - The ComponentMap object from which the parts of
the component should be obtained.
This parameter is typically passed as 'this' so that the parts are
created in the same container.
When implementing container interaction such as inheritance,
this parameter may be passed as a different ComponentMap object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||