Class AbstractActionsAttribute

    • Field Detail

      • _destinationNames

        protected java.util.List _destinationNames
        List of destination names.
      • _destinations

        protected java.util.List _destinations
        List of destinations.
      • _destinationsListVersion

        protected long _destinationsListVersion
        The workspace version number when the _destinations list is last updated.
      • _parseTreeEvaluator

        protected ParseTreeEvaluator _parseTreeEvaluator
        The parse tree evaluator.
      • _parseTrees

        protected java.util.List _parseTrees
        The list of parse trees.
    • Constructor Detail

      • AbstractActionsAttribute

        public AbstractActionsAttribute​(NamedObj container,
                                        java.lang.String name)
                                 throws IllegalActionException,
        Construct an action with the given name contained by the specified container (which should be a Transition when used in the FSM domain, and an Event in the Ptera domain). The container argument must not be null, or a NullPointerException will be thrown. This action will use the workspace of the container for synchronization and version counts. If the name argument is null, then the name is set to the empty string. This increments the version of the workspace.
        container - The container that contains this action.
        name - The name of this action.
        IllegalActionException - If the action is not of an acceptable class for the container, or if the name contains a period.
        NameDuplicationException - If the container already has an attribute with the name.
      • AbstractActionsAttribute

        public AbstractActionsAttribute​(Workspace workspace)
        Construct an action in the specified workspace with an empty string as a name. The object is added to the directory of the workspace. Increment the version number of the workspace.
        workspace - The workspace that will list the attribute.
    • Method Detail

      • clone

        public java.lang.Object clone​(Workspace workspace)
                               throws java.lang.CloneNotSupportedException
        Clone the actor into the specified workspace. This calls the base class and then sets the attribute public members to refer to the attributes of the new actor.
        clone in class StringAttribute
        workspace - The workspace for the new actor.
        A new FSMActor.
        java.lang.CloneNotSupportedException - If a derived class contains an attribute that cannot be cloned.
        See Also:
        NamedObj.exportMoML(Writer, int, String), NamedObj.setDeferringChangeRequests(boolean)
      • execute

        public void execute()
                     throws IllegalActionException
        Execute this action. For each destination identified in the action, compute the value in the action and perform the particular assignment. This method should be extended by derived classes to perform the evaluation and assignment as appropriate.
        Specified by:
        execute in class Action
        IllegalActionException - If a destination is not found.
      • getChannelNumberList

        public java.util.List getChannelNumberList()
                                            throws IllegalActionException
        Return the list of channel numbers given in expression set for this attribute. If no destinations are specified, then return an empty list.
        the list of channel numbers.
        IllegalActionException - If thrown while evaluating the channel numbers.
      • getDestination

        public NamedObj getDestination​(java.lang.String name)
                                throws IllegalActionException
        Return the destination object referred to by the given name. Depending on the subclass of this class, this might be a variable, or an output port.
        name - The name of the destination object.
        The destination object with the given name.
        IllegalActionException - If the given name is not a valid destination for this action.
      • getDestinations

        public java.util.List getDestinations()
                                       throws IllegalActionException
        Return the list of destinations of assignments in this action.
        Specified by:
        getDestinations in class Action
        A list of IOPort for output actions, and a list of parameters for set actions.
        IllegalActionException - If the destination list cannot be constructed.
      • getDestinationNameList

        public java.util.List getDestinationNameList()
        Return the list of destination names given in expression set for this attribute. If no destinations are specified, then return an empty list.
        the list of destination names.
      • getExpression

        public java.lang.String getExpression​(java.lang.String name)
        Return the expression referred to by the given name. When the action is executed, this expression will be evaluated and assigned to the object associated with the name.
        name - The name of an expression.
        The expression referred to by the given name.
        See Also:
      • getParseTree

        public ASTPtRootNode getParseTree​(java.lang.String name)
        Return the parse tree referred to by the given name.
        name - The name of a parse tree.
        The parse tree referred to by the given name.
      • getParseTreeList

        public java.util.List getParseTreeList()
        Return the list of parse trees given in expression set for this attribute. If no destinations are specified, then return an empty list.
        the list of parse trees.
      • isChannelSpecified

        public boolean isChannelSpecified​(java.lang.String name)
        Test if a channel number is associated with the given name.
        name - The channel name.
        true If a channel was specified.
      • toString

        public java.lang.String toString()
        Give a descriptive string.
        toString in class NamedObj
        The expression.
      • typeConstraints

        public java.util.Set<Inequality> typeConstraints()
        Return the type constraints of this object. The constraints are a set of inequalities.
        Specified by:
        typeConstraints in interface HasTypeConstraints
        a list of instances of Inequality.
        See Also:
      • _getDestination

        protected abstract NamedObj _getDestination​(java.lang.String name)
                                             throws IllegalActionException
        Given a destination name, return a NamedObj that matches that destination. An implementation of this method should never return null (throw an exception instead).
        name - The name of the destination, or null if none is found.
        An object (like a port or a variable) with the specified name.
        IllegalActionException - If the associated FSMActor does not have a destination with the specified name.
      • _getParserScope

        protected ParserScope _getParserScope()
        Return a parser scope used to evaluate or type-check this action.
        The parser scope.