Class ParameterPort

    • Field Detail

      • _parameter

        protected PortParameter _parameter
        The associated parameter.
    • Constructor Detail

      • ParameterPort

        public ParameterPort​(ComponentEntity container,
                             java.lang.String name)
                      throws IllegalActionException,
                             NameDuplicationException
        Construct a new input port in the specified container with the specified name. The specified container must implement the Actor interface, or an exception will be thrown.
        Parameters:
        container - The container.
        name - The name of the port.
        Throws:
        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.
      • ParameterPort

        protected ParameterPort​(ComponentEntity container,
                                java.lang.String name,
                                PortParameter parameter)
                         throws IllegalActionException,
                                NameDuplicationException
        Construct a new input port in the specified container with the specified name. The specified container must implement the Actor interface, or an exception will be thrown.
        Parameters:
        container - The container.
        name - The name of the port.
        parameter - The associate PortParameter, or null to create one.
        Throws:
        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.
    • Method Detail

      • clone

        public java.lang.Object clone​(Workspace workspace)
                               throws java.lang.CloneNotSupportedException
        Clone the port. This overrides the base class to remove the current association with a parameter. It is assumed that the parameter will also be cloned, and when the containers are set of this port and that parameter, whichever one is set second will result in re-establishment of the association.
        Overrides:
        clone in class TypedIOPort
        Parameters:
        workspace - The workspace in which to place the cloned port.
        Returns:
        The cloned port.
        Throws:
        java.lang.CloneNotSupportedException - Not thrown in this base class.
        See Also:
        Object.clone()
      • getParameter

        public PortParameter getParameter()
        Get the associated parameter.
        Returns:
        The associated parameter.
      • setDisplayName

        public void setDisplayName​(java.lang.String name)
        Set the display name, and propagate the name change to the associated parameter. Increment the version of the workspace. This method is write-synchronized on the workspace.
        Overrides:
        setDisplayName in class NamedObj
        Parameters:
        name - The new display name..
        See Also:
        NamedObj.getDisplayName()
      • _setTypeConstraints

        protected void _setTypeConstraints()
        Set the type constraints between the protected member _parameter and this port. This is a protected method so that subclasses can define different type constraints. It is assured that when this is called, _parameter is non-null. However, use caution, since this method may be called during construction of this port, and hence the port may not be fully constructed.