KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > internal > resources > ModelObject


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.core.internal.resources;
12
13 public abstract class ModelObject implements Cloneable JavaDoc {
14     protected String JavaDoc name;
15
16     public ModelObject() {
17         super();
18     }
19
20     public ModelObject(String JavaDoc name) {
21         setName(name);
22     }
23
24     public Object JavaDoc clone() {
25         try {
26             return super.clone();
27         } catch (CloneNotSupportedException JavaDoc e) {
28             return null; // won't happen
29
}
30     }
31
32     public String JavaDoc getName() {
33         return name;
34     }
35
36     public void setName(String JavaDoc value) {
37         name = value;
38     }
39 }
40
Popular Tags