1. /*
  2. * @(#)PackageDeclaration.java 1.1 04/01/26
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package com.sun.mirror.declaration;
  8. import java.util.Collection;
  9. /**
  10. * Represents the declaration of a package. Provides access to information
  11. * about the package and its members.
  12. *
  13. * <p> {@link com.sun.mirror.util.DeclarationFilter}
  14. * provides a simple way to select just the items of interest
  15. * when a method returns a collection of declarations.
  16. *
  17. * @author Joseph D. Darcy
  18. * @author Scott Seligman
  19. * @version 1.1 04/01/26
  20. * @since 1.5
  21. */
  22. public interface PackageDeclaration extends Declaration {
  23. /**
  24. * Returns the fully qualified name of this package.
  25. * This is also known as the package's <i>canonical</i> name.
  26. *
  27. * @return the fully qualified name of this package, or the
  28. * empty string if this is the unnamed package
  29. */
  30. String getQualifiedName();
  31. /**
  32. * Returns the declarations of the top-level classes in this package.
  33. * Interfaces are not included, but enum types are.
  34. *
  35. * @return the declarations of the top-level classes in this package
  36. *
  37. * @see com.sun.mirror.util.DeclarationFilter
  38. */
  39. Collection<ClassDeclaration> getClasses();
  40. /**
  41. * Returns the declarations of the top-level enum types in this package.
  42. *
  43. * @return the declarations of the top-level enum types in this package
  44. *
  45. * @see com.sun.mirror.util.DeclarationFilter
  46. */
  47. Collection<EnumDeclaration> getEnums();
  48. /**
  49. * Returns the declarations of the top-level interfaces in this package.
  50. * Annotation types are included.
  51. *
  52. * @return the declarations of the top-level interfaces in this package
  53. *
  54. * @see com.sun.mirror.util.DeclarationFilter
  55. */
  56. Collection<InterfaceDeclaration> getInterfaces();
  57. /**
  58. * Returns the declarations of the top-level annotation types in this
  59. * package.
  60. *
  61. * @return the declarations of the top-level annotation types in this
  62. * package
  63. *
  64. * @see com.sun.mirror.util.DeclarationFilter
  65. */
  66. Collection<AnnotationTypeDeclaration> getAnnotationTypes();
  67. }