01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdt.core.jdom;
11:
12: /**
13: * Represents an import declaration.
14: * The corresponding syntactic unit is ImportDeclaration (JLS2 7.5).
15: * An import has no children and its parent is a compilation unit.
16: * <p>
17: * This interface is not intended to be implemented by clients.
18: * </p>
19: * @deprecated The JDOM was made obsolete by the addition in 2.0 of the more
20: * powerful, fine-grained DOM/AST API found in the
21: * org.eclipse.jdt.core.dom package.
22: */
23: public interface IDOMImport extends IDOMNode {
24: /**
25: * The <code>IDOMImport</code> refinement of this <code>IDOMNode</code>
26: * method returns the name of this import. The syntax for an import name
27: * corresponds to a fully qualified type name, or to an on-demand package name
28: * as defined by ImportDeclaration (JLS2 7.5).
29: *
30: * @return the name of this import
31: */
32: public String getName();
33:
34: /**
35: * Returns whether this import declaration ends with <code>".*"</code>.
36: *
37: * @return <code>true</code> if this in an on-demand import
38: */
39: public boolean isOnDemand();
40:
41: /**
42: * Returns the modifier flags for this import. The flags can be examined using class
43: * <code>Flags</code>. Only the static flag is meaningful for import declarations.
44: * @return the modifier flags for this import
45: * @see org.eclipse.jdt.core.Flags
46: * @since 3.0
47: */
48: int getFlags();
49:
50: /**
51: * Sets the modifier flags for this import. The flags can be examined using class
52: * <code>Flags</code>. Only the static flag is meaningful for import declarations.
53: *
54: * @param flags the modifier flags for this import
55: * @see org.eclipse.jdt.core.Flags
56: * @since 3.0
57: */
58: void setFlags(int flags);
59:
60: /**
61: * The <code>IDOMImport</code> refinement of this <code>IDOMNode</code>
62: * method sets the name of this import. The syntax for an import name
63: * corresponds to a fully qualified type name, or to an on-demand package name
64: * as defined by ImportDeclaration (JLS2 7.5).
65: *
66: * @param name the given name
67: * @exception IllegalArgumentException if <code>null</code> is specified
68: */
69: public void setName(String name);
70: }
|