A massive organize imports and formatting of the sources using default Eclipse code...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / core / IParent.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 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 net.sourceforge.phpdt.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. Unless otherwise
22          * specified by the implementing element, the children are in no particular
23          * order.
24          * 
25          * @exception JavaModelException
26          *                if this element does not exist or if an exception occurs
27          *                while accessing its corresponding resource
28          * @return the immediate children of this element
29          */
30         IJavaElement[] getChildren() throws JavaModelException;
31
32         /**
33          * Returns whether this element has one or more immediate children. This is
34          * a convenience method, and may be more efficient than testing whether
35          * <code>getChildren</code> is an empty array.
36          * 
37          * @exception JavaModelException
38          *                if this element does not exist or if an exception occurs
39          *                while accessing its corresponding resource
40          * @return true if the immediate children of this element, false otherwise
41          */
42         boolean hasChildren() throws JavaModelException;
43 }