|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjfun.yan.DelegatingComponentMap
public class DelegatingComponentMap
The base class for delegating to a ComponentMap object. It forwards all method call to the delegated ComponentMap object, which makes it handy for customizing a ComponentMap object by subclassing.
Codehaus.org.
| Constructor Summary | |
|---|---|
DelegatingComponentMap(ComponentMap cmap)
Create new DelegatingComponentMap object. |
|
| 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. |
boolean |
equals(java.lang.Object other)
|
Component |
getComponent(java.lang.Object key)
Gets a Component identified by a key. |
Component |
getComponentOfType(java.lang.Class type)
Gets a Component object of a certain type. |
java.util.Collection |
getComponents()
Gets all components stored in this map. |
java.util.List |
getComponentsOfType(java.lang.Class type)
Gets all component objects that are of a certain type. |
protected ComponentMap |
getDelegateTarget()
Gets the ComponentMap object being delegated. |
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. |
int |
hashCode()
|
java.util.Set |
keys()
Get all the component keys. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DelegatingComponentMap(ComponentMap cmap)
cmap - the ComponentMap object to delegate to.| Method Detail |
|---|
public boolean containsKey(java.lang.Object key)
ComponentMap
containsKey in interface ComponentMapkey - the component key.
public boolean containsType(java.lang.Class type)
ComponentMap
containsType in interface ComponentMaptype - the type of the component.
public Dependency getDependencyOfType(java.lang.Class type,
ComponentMap cmap)
ComponentMap
getDependencyOfType in interface ComponentMaptype - 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.
public Dependency getDependency(java.lang.Object key,
ComponentMap cmap)
ComponentMap
getDependency in interface ComponentMapkey - 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.
public Component getComponent(java.lang.Object key)
ComponentMap
getComponent in interface ComponentMapkey - the component key.
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectprotected final ComponentMap getDelegateTarget()
public Component getComponentOfType(java.lang.Class type)
ComponentMap
getComponentOfType in interface ComponentMaptype - the component instance type.
public java.util.List getComponentsOfType(java.lang.Class type)
ComponentMap
getComponentsOfType in interface ComponentMaptype - the component instance type.
public java.util.Collection getComponents()
ComponentMap
getComponents in interface ComponentMappublic java.util.Set keys()
ComponentMap
keys in interface ComponentMap
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||