KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > internal > registry > NestedRegistryModelObject


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

11 package org.eclipse.core.internal.registry;
12
13 /**
14  * An object which has the general characteristics of all the nestable elements
15  * in a plug-in manifest.
16  * <p>
17  * This class may be subclassed.
18  * </p>
19  */

20
21 public abstract class NestedRegistryModelObject extends RegistryModelObject {
22     private RegistryModelObject parent;
23
24     /**
25      * Returns the plug-in model (descriptor or fragment) in which this extension is declared.
26      *
27      * @return the plug-in model in which this extension is declared
28      * or <code>null</code>
29      */

30     public Object JavaDoc getParent() {
31         return parent;
32     }
33
34     /**
35      * Sets the plug-in model in which this extension is declared.
36      *
37      * @param value the plug-in model in which this extension is declared.
38      * May be <code>null</code>.
39      */

40     public void setParent(RegistryModelObject value) {
41         parent = value;
42     }
43
44     ExtensionRegistry getRegistry() {
45         return parent == null ? null : parent.getRegistry();
46     }
47 }
Popular Tags