Interface Nameable

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String description()
      Return a description of the object.
      NamedObj getContainer()
      Return the container.
      java.lang.String getDisplayName()
      Return a name to present to the user.
      java.lang.String getFullName()
      Return the full name, which reflects the container object, if there is one.
      java.lang.String getName()
      Return the name of the object.
      java.lang.String getName​(NamedObj relativeTo)
      Get the name of this object relative to the specified container.
      void setName​(java.lang.String name)
      Set or change the name.
    • Method Detail

      • description

        java.lang.String description()
                              throws IllegalActionException
        Return a description of the object. The general form of the description is a space-delimited list of the form "className fullName keyword field keyword field ...". If any of the items contain spaces, then they must be surrounded by braces, as in "{two words}". Return characters or newlines may be be used as delimiters as well. The fields are usually lists of descriptions of this same form, although different forms can be used for different keywords. The keywords are extensible, but the following are in use: links, ports, entities, relations, attributes, and inside links, at least.
        Returns:
        A description of this object.
        Throws:
        IllegalActionException - If there is a problem accessing subcomponents of the object.
      • getContainer

        NamedObj getContainer()
        Return the container.
        Returns:
        The container.
      • getDisplayName

        java.lang.String getDisplayName()
        Return a name to present to the user.
        Returns:
        A name to present to the user.
      • getFullName

        java.lang.String getFullName()
        Return the full name, which reflects the container object, if there is one. For example the implementation in NamedObj concatenates the full name of the container objects with the name of the this object, separated by periods.
        Returns:
        The full name of the object.
      • getName

        java.lang.String getName()
        Return the name of the object.
        Returns:
        The name of the object.
        See Also:
        setName(String)
      • getName

        java.lang.String getName​(NamedObj relativeTo)
                          throws InvalidStateException
        Get the name of this object relative to the specified container. If this object is contained directly by the specified container, this is just its name, as returned by getName(). If it is deeply contained by the specified container, then the relative name is x1.x2. ... .name, where x1 is directly contained by the specified container, x2 is contained by x1, etc. If this object is not deeply contained by the specified container, then this method returns the full name of this object, as returned by getFullName().
        Parameters:
        relativeTo - The object relative to which you want the name.
        Returns:
        A string of the form "name2...nameN".
        Throws:
        InvalidStateException - If a recursive structure is encountered, where this object directly or indirectly contains itself. Note that this is a runtime exception so it need not be declared explicitly.
        See Also:
        setName(String)