public class MethodCallPort extends ComponentPort
NamedObj.ContainedObjectsIterator
_insideLinks, _relationsList
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
Constructor and Description |
---|
MethodCallPort()
Construct a port in the default workspace with an empty string
as its name.
|
MethodCallPort(ComponentEntity container,
java.lang.String name)
Construct a port with the given name contained by the specified
entity.
|
MethodCallPort(ComponentEntity container,
java.lang.String name,
boolean isProvidedPort)
Construct an IOPort with a container and a name that is
either an input, an output, or both, depending on the third
and fourth arguments.
|
MethodCallPort(Workspace workspace)
Construct a port in the specified workspace with an empty
string as a name.
|
Modifier and Type | Method and Description |
---|---|
TupleToken |
call(TupleToken arguments)
Call the method associated with this port with the specified
arguments.
|
java.lang.Object |
clone(Workspace workspace)
Clone the object into the specified workspace.
|
boolean |
isProvider()
Return true if this port provides the method,
vs. requires the method.
|
void |
setProvider(boolean isProvider)
Call with argument true to specify that this port provides the method,
and call with argument false to specify that it requires the method.
|
_checkContainer, _checkLiberalLink, _checkLink, _deepConnectedPortList, _deepConnectedPorts, _deepInsidePortList, _deepInsidePorts, _description, _isInsideLinkable, deepConnectedPortList, deepConnectedPorts, deepInsidePortList, deepInsidePorts, insertInsideLink, insertLink, insidePortList, insidePorts, insideRelationList, insideRelations, isDeeplyConnected, isInsideGroupLinked, isInsideLinked, isOpaque, liberalLink, link, numInsideLinks, setContainer, unlink, unlinkAll, unlinkAllInside, unlinkInside, unlinkInside
_getContainedObject, _propagateExistence, connectedPortList, connectedPorts, getContainer, isGroupLinked, isLinked, linkedRelationList, linkedRelations, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, numLinks, setName, unlink
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _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
public MethodCallPort()
public MethodCallPort(Workspace workspace)
workspace
- The workspace that will list the port.public MethodCallPort(ComponentEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container entity.name
- The name of the port.IllegalActionException
- If the port is not of an acceptable
class for the container.NameDuplicationException
- If the name coincides with
a port already in the container.public MethodCallPort(ComponentEntity container, java.lang.String name, boolean isProvidedPort) throws IllegalActionException, NameDuplicationException
container
- The container actor.name
- The name of the port.isProvidedPort
- True if this port provides the method.IllegalActionException
- If the port is not of an acceptable
class for the container, or if the container does not implement the
Actor interface.NameDuplicationException
- If the name coincides with
a port already in the container.public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class ComponentPort
workspace
- The workspace for the cloned object.java.lang.CloneNotSupportedException
- If one or more of the
attributes cannot be cloned.NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
public TupleToken call(TupleToken arguments)
If this port is a provider, as indicated by @link{#isProvider()}, then this method returns TupleToken.VOID, an empty tuple token. Subclasses should override this method to perform whatever functionality is associated with this method.
If this port is not a provider of this method, then this method delegates the call to all ports to which this port is deeply connected that are providers. The order in which those calls are performed is determined by the order in which connections are made. The returned token is a concatenation of the returned values of all the called methods. If there is nothing connected, then this method will return TupleToken.VOID.
arguments
- The arguments to the method.isProvider()
,
TupleToken.VOID
public boolean isProvider()
setProvider(boolean)
,
MethodCallPort(ComponentEntity, String, boolean)
,
call(TupleToken)
public void setProvider(boolean isProvider)