1 11 package org.eclipse.core.commands.common; 12 13 20 public abstract class NamedHandleObject extends HandleObject { 21 22 26 protected String description = null; 27 28 32 protected String name = null; 33 34 40 protected NamedHandleObject(final String id) { 41 super(id); 42 } 43 44 52 public String getDescription() throws NotDefinedException { 53 if (!isDefined()) { 54 throw new NotDefinedException( 55 "Cannot get a description from an undefined object. " + id); 57 } 58 59 return description; 60 } 61 62 69 public String getName() throws NotDefinedException { 70 if (!isDefined()) { 71 throw new NotDefinedException( 72 "Cannot get the name from an undefined object. " + id); 74 } 75 76 return name; 77 } 78 } 79 | Popular Tags |