Interface PackageInfo

All Superinterfaces:
AnnotationTarget, DeclarationInfo

public interface PackageInfo extends DeclarationInfo
A package, possibly annotated in package-info.java. Obtaining the set of members present in this package is not possible.
Since:
4.0
  • Method Details

    • name

      String name()
      Returns the fully qualified name of this package, as defined by The Java™ Language Specification; in other words, the package name as returned by Package.getName().
      Returns:
      fully qualified name of this package, never null
    • kind

      default DeclarationInfo.Kind kind()
      Description copied from interface: DeclarationInfo
      Returns the kind of this declaration.
      Specified by:
      kind in interface DeclarationInfo
      Returns:
      the kind of this declaration
    • asPackage

      default PackageInfo asPackage()
      Description copied from interface: DeclarationInfo
      Returns this declaration as a package.
      Specified by:
      asPackage in interface DeclarationInfo
      Returns:
      this package, never null