KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > core > IParent


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 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.jdt.core;
12
13 /**
14  * Common protocol for Java elements that contain other Java elements.
15  * <p>
16  * This interface is not intended to be implemented by clients.
17  * </p>
18  */

19 public interface IParent {
20 /**
21  * Returns the immediate children of this element.
22  * Unless otherwise specified by the implementing element,
23  * the children are in no particular order.
24  *
25  * @exception JavaModelException if this element does not exist or if an
26  * exception occurs while accessing its corresponding resource
27  * @return the immediate children of this element
28  */

29 IJavaElement[] getChildren() throws JavaModelException;
30 /**
31  * Returns whether this element has one or more immediate children.
32  * This is a convenience method, and may be more efficient than
33  * testing whether <code>getChildren</code> is an empty array.
34  *
35  * @exception JavaModelException if this element does not exist or if an
36  * exception occurs while accessing its corresponding resource
37  * @return true if the immediate children of this element, false otherwise
38  */

39 boolean hasChildren() throws JavaModelException;
40 }
41
Popular Tags