001: /*
002: * @(#)PackageDeclaration.java 1.1 04/01/26
003: *
004: * Copyright (c) 2004, Sun Microsystems, Inc.
005: * All rights reserved.
006: *
007: * Redistribution and use in source and binary forms, with or without
008: * modification, are permitted provided that the following conditions are met:
009: *
010: * * Redistributions of source code must retain the above copyright
011: * notice, this list of conditions and the following disclaimer.
012: * * Redistributions in binary form must reproduce the above copyright
013: * notice, this list of conditions and the following disclaimer in the
014: * documentation and/or other materials provided with the distribution.
015: * * Neither the name of the Sun Microsystems, Inc. nor the names of
016: * its contributors may be used to endorse or promote products derived from
017: * this software without specific prior written permission.
018: *
019: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
020: * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
021: * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
022: * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
023: * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
024: * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
025: * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
026: * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
027: * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
028: * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
029: * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
030: */
031:
032: package com.sun.mirror.declaration;
033:
034: import java.util.Collection;
035:
036: /**
037: * Represents the declaration of a package. Provides access to information
038: * about the package and its members.
039: *
040: * <p> {@link com.sun.mirror.util.DeclarationFilter}
041: * provides a simple way to select just the items of interest
042: * when a method returns a collection of declarations.
043: *
044: * @author Joseph D. Darcy
045: * @author Scott Seligman
046: * @version 1.1 04/01/26
047: * @since 1.5
048: */
049:
050: public interface PackageDeclaration extends Declaration {
051:
052: /**
053: * Returns the fully qualified name of this package.
054: * This is also known as the package's <i>canonical</i> name.
055: *
056: * @return the fully qualified name of this package, or the
057: * empty string if this is the unnamed package
058: */
059: String getQualifiedName();
060:
061: /**
062: * Returns the declarations of the top-level classes in this package.
063: * Interfaces are not included, but enum types are.
064: *
065: * @return the declarations of the top-level classes in this package
066: *
067: * @see com.sun.mirror.util.DeclarationFilter
068: */
069: Collection<ClassDeclaration> getClasses();
070:
071: /**
072: * Returns the declarations of the top-level enum types in this package.
073: *
074: * @return the declarations of the top-level enum types in this package
075: *
076: * @see com.sun.mirror.util.DeclarationFilter
077: */
078: Collection<EnumDeclaration> getEnums();
079:
080: /**
081: * Returns the declarations of the top-level interfaces in this package.
082: * Annotation types are included.
083: *
084: * @return the declarations of the top-level interfaces in this package
085: *
086: * @see com.sun.mirror.util.DeclarationFilter
087: */
088: Collection<InterfaceDeclaration> getInterfaces();
089:
090: /**
091: * Returns the declarations of the top-level annotation types in this
092: * package.
093: *
094: * @return the declarations of the top-level annotation types in this
095: * package
096: *
097: * @see com.sun.mirror.util.DeclarationFilter
098: */
099: Collection<AnnotationTypeDeclaration> getAnnotationTypes();
100: }
|