|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Decorator
A decorator is a class that decorates other NamedObj with extra attributes that are specific to both the decorator and the NamedObj.
A NamedObj can contain DecoratedAttributes. These are attributes that are
added by another NamedObj, called a decorator to this NamedObj.
An example is for example a code generator. This one has specific attributes
for for example the generated code of the director in a model. These attributes
are added by the Decorator (the code generator), to the director ("this" object).
These attributes are stored seperately and can be retrieved by using
NamedObj.getDecoratorAttributes(Decorator) or
NamedObj.getDecoratorAttributes(Decorator).
For a description of a decorator pattern, see http://en.wikipedia.org/wiki/Decorator_pattern.
| Red (rodiers) |
| Red (rodiers) |
| Method Summary | |
|---|---|
DecoratedAttributes |
createDecoratedAttributes(NamedObj target)
Return the decorated attributes for the target NamedObj. |
void |
setTypesOfDecoratedVariables(DecoratedAttributes decoratedAttributes)
Set the current type of the decorated attributes. |
| Methods inherited from interface ptolemy.kernel.util.Nameable |
|---|
description, getContainer, getDisplayName, getFullName, getName, getName, setName |
| Method Detail |
|---|
DecoratedAttributes createDecoratedAttributes(NamedObj target)
throws IllegalActionException,
NameDuplicationException
target - The NamedObj that will be decorated.
IllegalActionException - If the attribute is not of an
acceptable class for the container, or if the name contains a period.
NameDuplicationException - If the name coincides with
an attribute already in the container.
void setTypesOfDecoratedVariables(DecoratedAttributes decoratedAttributes)
throws IllegalActionException
decoratedAttributes - The decorated attributes.
IllegalActionException - If the attribute is not of an
acceptable class for the container, or if the name contains a period.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||