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
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpdt.core;
14 * Common protocol for Java elements that contain other Java elements.
16 * This interface is not intended to be implemented by clients.
19 public interface IParent {
21 * Returns the immediate children of this element. Unless otherwise
22 * specified by the implementing element, the children are in no particular
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
30 IJavaElement[] getChildren() throws JavaModelException;
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.
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
42 boolean hasChildren() throws JavaModelException;