Class DocAttribute

    • Constructor Detail

      • DocAttribute

        public DocAttribute​(NamedObj container,
                            java.lang.String name)
                     throws IllegalActionException,
                            NameDuplicationException
        Construct a documentation attribute with the given name contained by the specified entity. The container argument must not be null, or a NullPointerException will be thrown. This attribute 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. Increment the version of the workspace.
        Parameters:
        container - The container.
        name - The name of this attribute.
        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.
      • DocAttribute

        public DocAttribute()
        Construct an empty DocAttribute.
      • DocAttribute

        public DocAttribute​(Workspace workspace)
        Construct a DocAttribute in a given workspace.
        Parameters:
        workspace - The workspace in which to construct the DocAttribute.
    • Method Detail

      • getParameterDoc

        public java.lang.String getParameterDoc​(java.lang.String name)
        Return the documentation for the given parameter, or null if there none.
        Parameters:
        name - The name of the parameter.
        Returns:
        The documentation for the given parameter, or null if there is none.
      • getPortDoc

        public java.lang.String getPortDoc​(java.lang.String name)
        Return the documentation for the given port, or null if there none.
        Parameters:
        name - The name of the port.
        Returns:
        The documentation for the given port, or null if there is none.
      • refreshParametersAndPorts

        public void refreshParametersAndPorts()
        For each parameter and port in the container, create a parameter with the same name appended with either " (port)", " (port-parameter)", or " (parameter)". For parameters, only those that are settable are shown, and only if the visibility is "FULL". This method also removes any parameters that have no corresponding parameter or port in the container. Since this method modifies the model by adding or removing parameters to this attribute, it should be called from inside a change request.