1 /*******************************************************************************
2 * Copyright (c) 2000, 2004 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 * IBM Corporation - added J2SE 1.5 support
11 *******************************************************************************/
12 package net.sourceforge.phpdt.core;
16 * Represents an import declaration in Java compilation unit.
18 * This interface is not intended to be implemented by clients.
21 public interface IImportDeclaration extends IJavaElement, ISourceReference, ISourceManipulation {
23 * Returns the name that has been imported.
24 * For an on-demand import, this includes the trailing <code>".*"</code>.
25 * For example, for the statement <code>"import java.util.*"</code>,
26 * this returns <code>"java.util.*"</code>.
27 * For the statement <code>"import java.util.Hashtable"</code>,
28 * this returns <code>"java.util.Hashtable"</code>.
30 * @return the name that has been imported
32 String getElementName();
34 * Returns the modifier flags for this import. The flags can be examined using class
35 * <code>Flags</code>. Only the static flag is meaningful for import declarations.
37 * @return the modifier flags for this import
38 * @exception JavaModelException if this element does not exist or if an
39 * exception occurs while accessing its corresponding resource.
43 int getFlags() throws JavaModelException;
46 * Returns whether the import is on-demand. An import is on-demand if it ends
47 * with <code>".*"</code>.
48 * @return true if the import is on-demand, false otherwise