public class SingletonConfigurableAttribute extends ConfigurableAttribute implements Singleton
NamedObj.ContainedObjectsIterator
Settable.Visibility
_attributes, _changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
EXPERT, FULL, NONE, NOT_EDITABLE
Constructor and Description |
---|
SingletonConfigurableAttribute()
Construct a new attribute with no
container and an empty string as its name.
|
SingletonConfigurableAttribute(NamedObj container,
java.lang.String name)
Construct an attribute with the given container and name.
|
SingletonConfigurableAttribute(Workspace workspace)
Construct a new attribute with
no container and an empty string as a name.
|
Modifier and Type | Method and Description |
---|---|
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.
|
_exportMoMLContents, _propagateValue, addValueListener, clone, configure, getBase, getConfigureSource, getConfigureText, getDefaultExpression, getExpression, getValueAsString, getVisibility, removeValueListener, setExpression, setVisibility, validate, value
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDisplayName
description, getContainer, getFullName, getName, getName, setName
public SingletonConfigurableAttribute()
public SingletonConfigurableAttribute(Workspace workspace)
workspace
- The workspace that will list the attribute.public SingletonConfigurableAttribute(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
SingletonConfigurableAttribute.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 Attribute
container
- 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()