ptolemy.actor.gt
Class ActorScopeExtender

java.lang.Object
  extended by ptolemy.kernel.util.NamedObj
      extended by ptolemy.kernel.util.Attribute
          extended by ptolemy.data.expr.ScopeExtendingAttribute
              extended by ptolemy.actor.gt.ActorScopeExtender
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, ScopeExtender, Changeable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

public class ActorScopeExtender
extends ScopeExtendingAttribute

A scope extender for CompositeActorMatcher that resolves entities inside.

Since:
Ptolemy II 6.1
Version:
$Id: ActorScopeExtender.java,v 1.4.4.3 2008/03/25 23:11:31 cxh Exp $
Author:
Thomas Huining Feng
See Also:
Serialized Form
Accepted Rating:
Red (tfeng)
Proposed Rating:
Red (tfeng)

Nested Class Summary
 
Nested classes/interfaces 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
ActorScopeExtender(NamedObj container, java.lang.String name)
          Construct a scope extender.
 
Method Summary
 java.util.List<?> attributeList()
          Return a list of all entities contained in the container, wrapping each entity in a NamedObjVariable.
 Attribute getAttribute(java.lang.String name)
          Return an entity in the container with the given name, wrapped in a NamedObjVariable.
 
Methods inherited from class ptolemy.data.expr.ScopeExtendingAttribute
setContainer
 
Methods inherited from class ptolemy.kernel.util.Attribute
_getContainedObject, _propagateExistence, clone, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent
 
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _description, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, attributeChanged, attributeList, attributeTypeChanged, clone, containedObjectsIterator, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, message, propagateExistence, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ActorScopeExtender

public ActorScopeExtender(NamedObj container,
                          java.lang.String name)
                   throws IllegalActionException,
                          NameDuplicationException
Construct a scope extender.

Parameters:
container - The CompositeActor or CompositeActorMatcher that contains this scope extender.
name - The name of the scope extender.
Throws:
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.
Method Detail

attributeList

public java.util.List<?> attributeList()
Return a list of all entities contained in the container, wrapping each entity in a NamedObjVariable.

Specified by:
attributeList in interface ScopeExtender
Overrides:
attributeList in class NamedObj
Returns:
A list of all entities.

getAttribute

public Attribute getAttribute(java.lang.String name)
Return an entity in the container with the given name, wrapped in a NamedObjVariable.

Specified by:
getAttribute in interface ScopeExtender
Overrides:
getAttribute in class NamedObj
Parameters:
name - The name of the entity.
Returns:
The entity wrapped in a NamedObjVariable.