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 *******************************************************************************/ 11 package org.eclipse.jdt.core.jdom; 12 /** 13 * Represents a package declaration. 14 * The corresponding syntactic unit is PackageDeclaration (JLS2 7.4). 15 * A Package 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 IDOMPackage extends IDOMNode { 24 /** 25 * The <code>IDOMPackage</code> refinement of this <code>IDOMNode</code> 26 * method returns the name of this package declaration, or <code>null</code> 27 * if it has none. The syntax for a package name corresponds to PackageName 28 * as defined by PackageDeclaration (JLS2 7.4). 29 * 30 * @return the name of this package declaration, or <code>null</code> 31 * if it has none 32 */ 33 public String getName(); 34 /** 35 * The <code>IDOMPackage</code> refinement of this <code>IDOMNode</code> 36 * method sets the name of this package declaration. The syntax for a package 37 * name corresponds to PackageName as defined by PackageDeclaration (JLS2 7.4). 38 * A <code>null</code> name indicates an empty package declaration; that is, 39 * <code>getContents</code> returns the empty string. 40 * 41 * @param name the given name 42 */ 43 public void setName(String name); 44 } 45