|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Nameable
This is an interface for objects with a name and a container. A simple name is an arbitrary string that identifies the object in the context of its container. In addition, the interface supports a "full name" which in implementation should identify both the container and the individual object. The implementations in the kernel package define the full name of an object to be the full name of its container followed by a period followed by the simple name of the object. Periods and braces are not permitted in the name.
Green (johnr) |
Green (eal) |
Method Summary | |
---|---|
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 |
---|
java.lang.String description() throws IllegalActionException
IllegalActionException
NamedObj getContainer()
java.lang.String getDisplayName()
java.lang.String getFullName()
java.lang.String getName()
setName(String)
java.lang.String getName(NamedObj relativeTo) throws InvalidStateException
relativeTo
- The object relative to which you want the name.
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.setName(String)
void setName(java.lang.String name) throws IllegalActionException, NameDuplicationException
name
- The new name.
IllegalActionException
- If the name contains a period.
NameDuplicationException
- If the container already
contains an object with this name.getName()
,
getName(NamedObj)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |