KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > core > IImportDeclaration


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  * IBM Corporation - added J2SE 1.5 support
11  *******************************************************************************/

12 package org.eclipse.jdt.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, ISourceManipulation {
21 /**
22  * Returns the name that has been imported.
23  * For an on-demand import, this includes the trailing <code>".*"</code>.
24  * For example, for the statement <code>"import java.util.*"</code>,
25  * this returns <code>"java.util.*"</code>.
26  * For the statement <code>"import java.util.Hashtable"</code>,
27  * this returns <code>"java.util.Hashtable"</code>.
28  *
29  * @return the name that has been imported
30  */

31 String JavaDoc getElementName();
32 /**
33  * Returns the modifier flags for this import. The flags can be examined using class
34  * <code>Flags</code>. Only the static flag is meaningful for import declarations.
35  *
36  * @return the modifier flags for this import
37  * @exception JavaModelException if this element does not exist or if an
38  * exception occurs while accessing its corresponding resource.
39  * @see Flags
40  * @since 3.0
41  */

42 int getFlags() throws JavaModelException;
43
44 /**
45  * Returns whether the import is on-demand. An import is on-demand if it ends
46  * with <code>".*"</code>.
47  * @return true if the import is on-demand, false otherwise
48  */

49 boolean isOnDemand();
50 }
51
Popular Tags