org.eclipse.core.commands.common
Class NamedHandleObject
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.core.commands.common.HandleObject
org.eclipse.core.commands.common.NamedHandleObject
- All Implemented Interfaces:
- IIdentifiable
- Direct Known Subclasses:
- Category, Command, Context
public abstract class NamedHandleObject
- extends HandleObject
A handle object that carries with it a name and a description. This type of
handle object is quite common across the commands code base. For example,
Command
, Context
and Scheme
.
- Since:
- 3.1
Field Summary |
protected java.lang.String |
description
The description for this handle. |
protected java.lang.String |
name
The name of this handle. |
Constructor Summary |
protected |
NamedHandleObject(java.lang.String id)
Constructs a new instance of NamedHandleObject . |
Method Summary |
java.lang.String |
getDescription()
Returns the description for this handle. |
java.lang.String |
getName()
Returns the name for this handle. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
description
protected java.lang.String description
- The description for this handle. This value may be
null
if
the handle is undefined or has no description.
name
protected java.lang.String name
- The name of this handle. This valud should not be
null
unless the handle is undefined.
NamedHandleObject
protected NamedHandleObject(java.lang.String id)
- Constructs a new instance of
NamedHandleObject
.
- Parameters:
id
- The identifier for this handle; must not be null
.
getDescription
public java.lang.String getDescription()
throws NotDefinedException
- Returns the description for this handle.
- Returns:
- The description; may be
null
if there is no
description.
- Throws:
NotDefinedException
- If the handle is not currently defined.
getName
public java.lang.String getName()
throws NotDefinedException
- Returns the name for this handle.
- Returns:
- The name for this handle; never
null
.
- Throws:
NotDefinedException
- If the handle is not currently defined.