improved PHP parser
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / core / IImportDeclaration.java
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
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *     IBM Corporation - added J2SE 1.5 support
11  *******************************************************************************/
12 package net.sourceforge.phpdt.core;
13
14
15 /**
16  * Represents an import declaration in Java compilation unit.
17  * <p>
18  * This interface is not intended to be implemented by clients.
19  * </p>
20  */
21 public interface IImportDeclaration extends IJavaElement, ISourceReference, ISourceManipulation {
22 /**
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>.
29  * 
30  * @return the name that has been imported
31  */
32 String getElementName();
33 /**
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.
36  * 
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.
40  * @see Flags
41  * @since 3.0
42  */
43 int getFlags() throws JavaModelException;
44
45 /**
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
49  */
50 boolean isOnDemand();
51
52 }