|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.composite.composites.BaseComposite net.sf.composite.composites.CompositeDecorator
public class CompositeDecorator
Wraps a SimpleComposite so that it implements the ListableComposite and SpecializableComposite interfaces.
Constructor Summary | |
---|---|
CompositeDecorator()
Creates a new composite decorator. |
|
CompositeDecorator(SimpleComposite composite)
Creates a new composite that decorates the given composite. |
Method Summary | |
---|---|
java.lang.Object[] |
getComponents()
Retrieves the components of the underlying composite. |
SimpleComposite |
getComposite()
|
boolean |
isSpecializable(java.lang.Class type)
Indicates whether this composite can expose the given interface by dynamically creating a new composite. |
void |
setComponents(java.lang.Object[] components)
Sets the components of the underlying compmosite |
void |
setComposite(SimpleComposite composite)
|
java.lang.Object |
specialize(java.lang.Class type)
Uses the components in this composite to dynamically create a composite that implements type . |
Methods inherited from class net.sf.composite.composites.BaseComposite |
---|
containsComponentOfType, getComponentsOfType, getComponentType, getComponentValidator, getSpecializer, initializeImpl, setComponent, setComponentValidator, setSpecializer, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompositeDecorator()
setComposite(SimpleComposite)
method
must be called
public CompositeDecorator(SimpleComposite composite)
composite
- the composite to be decorated.Method Detail |
---|
public boolean isSpecializable(java.lang.Class type) throws SpecializationException
SpecializableComposite
isSpecializable
in interface SpecializableComposite
isSpecializable
in class BaseComposite
type
- the interface to be exposed
SpecializationException
- if an error occurrspublic java.lang.Object specialize(java.lang.Class type) throws SpecializationException
SpecializableComposite
type
.
specialize
in interface SpecializableComposite
specialize
in class BaseComposite
type
- the interface to be exposed
SpecializationException
- if an error occurs while creating the new, specialized,
composite that implements the requested interfacepublic SimpleComposite getComposite()
public void setComposite(SimpleComposite composite)
public java.lang.Object[] getComponents()
getComponents
in interface SimpleComposite
getComponents
in class BaseComposite
public void setComponents(java.lang.Object[] components)
setComponents
in interface SimpleComposite
setComponents
in class BaseComposite
components
- the new components that will make up the underlying composite
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |