Interface PackageDeclaration

All Superinterfaces:
Declaration

public interface PackageDeclaration extends Declaration
Represents the declaration of a package. Provides access to information about the package and its members.

DeclarationFilter provides a simple way to select just the items of interest when a method returns a collection of declarations.

Since:
1.5
Version:
1.1 04/01/26
Author:
Joseph D. Darcy, Scott Seligman
  • Method Details

    • getQualifiedName

      String getQualifiedName()
      Returns the fully qualified name of this package. This is also known as the package's canonical name.
      Returns:
      the fully qualified name of this package, or the empty string if this is the unnamed package
    • getClasses

      Returns the declarations of the top-level classes in this package. Interfaces are not included, but enum types are.
      Returns:
      the declarations of the top-level classes in this package
      See Also:
    • getEnums

      Returns the declarations of the top-level enum types in this package.
      Returns:
      the declarations of the top-level enum types in this package
      See Also:
    • getInterfaces

      Returns the declarations of the top-level interfaces in this package. Annotation types are included.
      Returns:
      the declarations of the top-level interfaces in this package
      See Also:
    • getAnnotationTypes

      Collection<AnnotationTypeDeclaration> getAnnotationTypes()
      Returns the declarations of the top-level annotation types in this package.
      Returns:
      the declarations of the top-level annotation types in this package
      See Also: