Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse JDT Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.jdt.core
Interface IParent

All Known Subinterfaces:
  IClassFile, ICompilationUnit, IField, IImportContainer, IInitializer, IJavaModel, IJavaProject, IMember, IMethod, IPackageFragment, IPackageFragmentRoot, IType

public interface IParent

Common protocol for Java elements that contain other Java elements.

This interface is not intended to be implemented by clients.

Method Summary
`IJavaElement[]` | `getChildren()` Returns the immediate children of this element.
`boolean` | `hasChildren()` Returns whether this element has one or more immediate children.

Method Detail

### getChildren

    public IJavaElement[] getChildren()
                               throws JavaModelException

  Returns the immediate children of this element. Unless otherwise specified by the implementing element, the children are in no particular order.

  Returns:
    the immediate children of this element
  Throws:
    `JavaModelException` - if this element does not exist or if an exception occurs while accessing its corresponding resource

### hasChildren

    public boolean hasChildren()
                        throws JavaModelException

  Returns whether this element has one or more immediate children. This is a convenience method, and may be more efficient than testing whether `getChildren` is an empty array.

  Returns:
    true if the immediate children of this element, false otherwise
  Throws:
    `JavaModelException` - if this element does not exist or if an exception occurs while accessing its corresponding resource

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse JDT Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) IBM Corp. and others 2000, 2004. All Rights Reserved.