|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object extended byptolemy.kernel.util.NamedObj extended byptolemy.kernel.util.Attribute extended byptolemy.kernel.util.SingletonAttribute
This class is an attribute that replaces any previously existing attribute in the container that has the same name.
| Nested Class Summary |
| Nested classes inherited from class ptolemy.kernel.util.NamedObj |
NamedObj.ContainedObjectsIterator |
| Field Summary |
| Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
| Constructor Summary | |
SingletonAttribute()
Construct a new attribute with no container and an empty string as its name. |
|
SingletonAttribute(NamedObj container,
java.lang.String name)
Construct an attribute with the given container and name. |
|
SingletonAttribute(Workspace workspace)
Construct a new attribute with no container and an empty string as a name. |
|
| Method Summary | |
void |
setContainer(NamedObj container)
Remove any previous attribute in the container that has the same name as this attribute, and then call the base class method to set the container. |
| Methods inherited from class ptolemy.kernel.util.Attribute |
_getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public SingletonAttribute()
public SingletonAttribute(Workspace workspace)
workspace - The workspace that will list the attribute.public SingletonAttribute(NamedObj container, java.lang.String name) throws NameDuplicationException, IllegalActionException
container - The container.name - The name of this attribute.
IllegalActionException - If the attribute cannot be contained
by the proposed container.
NameDuplicationException - If the container already has an
attribute with this name, and the class of that container is not
SingletonAttribute.| Method Detail |
public void setContainer(NamedObj container) throws IllegalActionException, NameDuplicationException
Note that since an Attribute is a NamedObj, it can itself have attributes. However, recursive containment is not allowed, where an attribute is an attribute of itself, or indirectly of any attribute it contains.
This method is write-synchronized on the workspace and increments its version number.
setContainer in class Attributecontainer - The container to attach this attribute to.
IllegalActionException - If this attribute is not of the
expected class for the container, or it has no name,
or the attribute and container are not in the same workspace, or
the proposed container would result in recursive containment.
NameDuplicationException - If the container already has
an attribute with the name of this attribute that is of class
SingletonConfigurableAttribute.Attribute.getContainer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||