A massive organize imports and formatting of the sources using default Eclipse code...
[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  * Represents an import declaration in Java compilation unit.
16  * <p>
17  * This interface is not intended to be implemented by clients.
18  * </p>
19  */
20 public interface IImportDeclaration extends IJavaElement, ISourceReference,
21                 ISourceManipulation {
22         /**
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>.
29          * 
30          * @return the name that has been imported
31          */
32         String getElementName();
33
34         /**
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.
38          * 
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.
43          * @see Flags
44          * @since 3.0
45          */
46         int getFlags() throws JavaModelException;
47
48         /**
49          * Returns whether the import is on-demand. An import is on-demand if it
50          * ends with <code>".*"</code>.
51          * 
52          * @return true if the import is on-demand, false otherwise
53          */
54         boolean isOnDemand();
55
56 }