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