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;
15 * Represents an import declaration in Java compilation unit.
17 * This interface is not intended to be implemented by clients.
20 public interface IImportDeclaration extends IJavaElement, ISourceReference,
23 * Returns the name that has been imported. For an on-demand import, this
24 * includes the trailing <code>".*"</code>. For example, for the
25 * statement <code>"import java.util.*"</code>, this returns
26 * <code>"java.util.*"</code>. For the statement
27 * <code>"import java.util.Hashtable"</code>, this returns
28 * <code>"java.util.Hashtable"</code>.
30 * @return the name that has been imported
32 String getElementName();
35 * Returns the modifier flags for this import. The flags can be examined
36 * using class <code>Flags</code>. Only the static flag is meaningful for
37 * import declarations.
39 * @return the modifier flags for this import
40 * @exception JavaModelException
41 * if this element does not exist or if an exception occurs
42 * while accessing its corresponding resource.
46 int getFlags() throws JavaModelException;
49 * Returns whether the import is on-demand. An import is on-demand if it
50 * ends with <code>".*"</code>.
52 * @return true if the import is on-demand, false otherwise