public abstract class AbstractSettableAttribute extends Attribute implements Settable
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
Modifier | Constructor and Description |
---|---|
|
AbstractSettableAttribute()
Construct an attribute in the default workspace with an empty string
as its name.
|
|
AbstractSettableAttribute(NamedObj container,
java.lang.String name)
Construct an attribute with the given name contained by the specified
entity.
|
protected |
AbstractSettableAttribute(NamedObj container,
java.lang.String name,
boolean incrementWorkspaceVersion)
Construct an attribute with the given name contained by the specified
entity.
|
|
AbstractSettableAttribute(Workspace workspace)
Construct an attribute in the specified workspace with an empty
string as a name.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDefaultExpression()
Return the default value of this Settable, or null if no default
has been set.
|
java.lang.String |
getValueAsString()
Get the value of the attribute, which is the evaluated expression.
|
void |
setExpression(java.lang.String expression)
Set the value of this attribute to the specified expression.
|
_checkContainer, _getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setContainer, setName, updateContent
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _description, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _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
addValueListener, getDisplayName, getExpression, getVisibility, removeValueListener, setVisibility, validate
description, getContainer, getFullName, getName, getName, setName
public AbstractSettableAttribute()
public AbstractSettableAttribute(Workspace workspace)
workspace
- The workspace that will list the attribute.public AbstractSettableAttribute(NamedObj container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of this attribute.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.protected AbstractSettableAttribute(NamedObj container, java.lang.String name, boolean incrementWorkspaceVersion) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of this attribute.incrementWorkspaceVersion
- False to not add this to the workspace
or do anything else that might change the workspace version number.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.public java.lang.String getDefaultExpression()
getDefaultExpression
in interface Settable
setExpression(String)
,
Instantiable
public java.lang.String getValueAsString()
getValueAsString
in interface Settable
Settable.getExpression()
public void setExpression(java.lang.String expression) throws IllegalActionException
setExpression
in interface Settable
expression
- The value of this attribute.IllegalActionException
- If the expression is invalid
(not thrown in this base class).getDefaultExpression()