Path: blob/aarch64-shenandoah-jdk8u272-b10/langtools/src/share/classes/javax/lang/model/element/PackageElement.java
38899 views
/*1* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package javax.lang.model.element;2627import java.util.List;2829/**30* Represents a package program element. Provides access to information31* about the package and its members.32*33* @author Joseph D. Darcy34* @author Scott Seligman35* @author Peter von der Ahé36* @see javax.lang.model.util.Elements#getPackageOf37* @since 1.638*/39public interface PackageElement extends Element, QualifiedNameable {4041/**42* Returns the fully qualified name of this package.43* This is also known as the package's <i>canonical</i> name.44*45* @return the fully qualified name of this package, or an46* empty name if this is an unnamed package47* @jls 6.7 Fully Qualified Names and Canonical Names48*/49Name getQualifiedName();5051/**52* Returns the simple name of this package. For an unnamed53* package, an empty name is returned.54*55* @return the simple name of this package or an empty name if56* this is an unnamed package57*/58@Override59Name getSimpleName();6061/**62* Returns the {@linkplain NestingKind#TOP_LEVEL top-level}63* classes and interfaces within this package. Note that64* subpackages are <em>not</em> considered to be enclosed by a65* package.66*67* @return the top-level classes and interfaces within this68* package69*/70@Override71List<? extends Element> getEnclosedElements();7273/**74* Returns {@code true} is this is an unnamed package and {@code75* false} otherwise.76*77* @return {@code true} is this is an unnamed package and {@code78* false} otherwise79* @jls 7.4.2 Unnamed Packages80*/81boolean isUnnamed();8283/**84* Returns {@code null} since a package is not enclosed by another85* element.86*87* @return {@code null}88*/89@Override90Element getEnclosingElement();91}929394