1 /*******************************************************************************
2 * Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Common Public License v0.5
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/cpl-v05.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.
22 * Unless otherwise specified by the implementing element,
23 * the children are in no particular order.
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
29 IJavaElement[] getChildren() throws JavaModelException;
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.
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
39 boolean hasChildren() throws JavaModelException;