< prev index next >

src/java.compiler/share/classes/javax/lang/model/element/PackageElement.java

Print this page




  27 
  28 import java.util.List;
  29 
  30 /**
  31  * Represents a package program element.  Provides access to information
  32  * about the package and its members.
  33  *
  34  * @author Joseph D. Darcy
  35  * @author Scott Seligman
  36  * @author Peter von der Ah&eacute;
  37  * @see javax.lang.model.util.Elements#getPackageOf
  38  * @since 1.6
  39  */
  40 public interface PackageElement extends Element, QualifiedNameable {
  41 
  42     /**
  43      * Returns the fully qualified name of this package.
  44      * This is also known as the package's <i>canonical</i> name.
  45      * For an {@linkplain #isUnnamed() unnamed package}, an empty name is returned.
  46      *







  47      * @return the fully qualified name of this package, or an
  48      * empty name if this is an unnamed package
  49      * @jls 6.7 Fully Qualified Names and Canonical Names
  50      */
  51     Name getQualifiedName();
  52 
  53     /**
  54      * Returns the simple name of this package.  For an {@linkplain
  55      * #isUnnamed() unnamed package}, an empty name is returned.
  56      *
  57      * @return the simple name of this package or an empty name if
  58      * this is an unnamed package
  59      */
  60     @Override
  61     Name getSimpleName();
  62 
  63     /**
  64      * Returns the {@linkplain NestingKind#TOP_LEVEL top-level}
  65      * classes and interfaces within this package.  Note that
  66      * subpackages are <em>not</em> considered to be enclosed by a




  27 
  28 import java.util.List;
  29 
  30 /**
  31  * Represents a package program element.  Provides access to information
  32  * about the package and its members.
  33  *
  34  * @author Joseph D. Darcy
  35  * @author Scott Seligman
  36  * @author Peter von der Ah&eacute;
  37  * @see javax.lang.model.util.Elements#getPackageOf
  38  * @since 1.6
  39  */
  40 public interface PackageElement extends Element, QualifiedNameable {
  41 
  42     /**
  43      * Returns the fully qualified name of this package.
  44      * This is also known as the package's <i>canonical</i> name.
  45      * For an {@linkplain #isUnnamed() unnamed package}, an empty name is returned.
  46      *
  47      * @apiNote The fully qualified name of a named package that is
  48      * not a subpackage of a named package is its simple name. The
  49      * fully qualified name of a named package that is a subpackage of
  50      * another named package consists of the fully qualified name of
  51      * the containing package, followed by "{@code .}", followed by the simple
  52      * (member) name of the subpackage.
  53      *
  54      * @return the fully qualified name of this package, or an
  55      * empty name if this is an unnamed package
  56      * @jls 6.7 Fully Qualified Names and Canonical Names
  57      */
  58     Name getQualifiedName();
  59 
  60     /**
  61      * Returns the simple name of this package.  For an {@linkplain
  62      * #isUnnamed() unnamed package}, an empty name is returned.
  63      *
  64      * @return the simple name of this package or an empty name if
  65      * this is an unnamed package
  66      */
  67     @Override
  68     Name getSimpleName();
  69 
  70     /**
  71      * Returns the {@linkplain NestingKind#TOP_LEVEL top-level}
  72      * classes and interfaces within this package.  Note that
  73      * subpackages are <em>not</em> considered to be enclosed by a


< prev index next >