public class LibraryAttribute extends ConfigurableAttribute
When creating a library to associate with this attribute, the library should be created in the same workspace as this attribute (as returned by the workspace() method). Normally, it will have no container. The text specified in the configure element (or a call to the configure() method) is not parsed until the getLibrary() method is called. Thus, the overhead of creating the library is avoided if the library is not used.
NamedObj.ContainedObjectsIterator
Settable.Visibility
_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 |
---|
LibraryAttribute()
Construct a new attribute with no
container and an empty string as its name.
|
LibraryAttribute(NamedObj container,
java.lang.String name)
Construct an attribute with the given container and name.
|
LibraryAttribute(Workspace workspace)
Construct a new attribute with
no container and an empty string as a name.
|
Modifier and Type | Method and Description |
---|---|
CompositeEntity |
getLibrary()
Return the library specified by the configure() method or the
setLibrary() method, or null if it has not been set.
|
void |
setLibrary(CompositeEntity library)
Specify the library, overriding any library that might have been
or might later be specified by a call to configure().
|
_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, setContainer, 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 LibraryAttribute()
public LibraryAttribute(Workspace workspace)
workspace
- The workspace that will list the attribute.public LibraryAttribute(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
LibraryAttribute.public CompositeEntity getLibrary() throws java.lang.Exception
java.lang.Exception
- If the library specification
is invalid, for example because the MoML cannot be parsed, or
because it does not define an instance of CompositeEntity.setLibrary(CompositeEntity)
public void setLibrary(CompositeEntity library)
library
- The library.getLibrary()