blob: 70e03a3c42292261457c15e2c14a9f97c37f3f41 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2000, 2008 IBM Corporation and others.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.dltk.core;
/**
* Represents an import container is a child of a Java compilation unit that
* contains all (and only) the import declarations. If a compilation unit has no
* import declarations, no import container will be present.
*
* @noimplement This interface is not intended to be implemented by clients.
* @since 2.0
*/
public interface IImportContainer extends IModelElement, IParent,
ISourceReference {
/**
* Returns the first import declaration in this import container with the
* given name. This is a handle-only method. The import declaration may or
* may not exist.
*
* @param name
* the given name
*
* @return the first import declaration in this import container with the
* given name
*/
IImportDeclaration getImport(String name, String version);
/**
* @see {@link #getImport(String, String)}
* @param alias
* the given alias
* @param {@link IModelElement}
* @param user
* mmodifiers
* @since 5.2
*/
IImportDeclaration getImport(String name, String version, String alias,
int type, int flags);
/**
* @since 3.0
*/
IImportDeclaration[] getImports() throws ModelException;
String getContainerName();
}