langtools/src/jdk.javadoc/share/classes/com/sun/javadoc/PackageDoc.java
changeset 25874 83c19f00452c
parent 23136 aa8958a4c8f4
child 38617 d93a7f64e231
equal deleted inserted replaced
25873:024ed9c9ed13 25874:83c19f00452c
       
     1 /*
       
     2  * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
       
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       
     4  *
       
     5  * This code is free software; you can redistribute it and/or modify it
       
     6  * under the terms of the GNU General Public License version 2 only, as
       
     7  * published by the Free Software Foundation.  Oracle designates this
       
     8  * particular file as subject to the "Classpath" exception as provided
       
     9  * by Oracle in the LICENSE file that accompanied this code.
       
    10  *
       
    11  * This code is distributed in the hope that it will be useful, but WITHOUT
       
    12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
       
    13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
       
    14  * version 2 for more details (a copy is included in the LICENSE file that
       
    15  * accompanied this code).
       
    16  *
       
    17  * You should have received a copy of the GNU General Public License version
       
    18  * 2 along with this work; if not, write to the Free Software Foundation,
       
    19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
       
    20  *
       
    21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
       
    22  * or visit www.oracle.com if you need additional information or have any
       
    23  * questions.
       
    24  */
       
    25 
       
    26 package com.sun.javadoc;
       
    27 
       
    28 /**
       
    29  * Represents a java package.  Provides access to information
       
    30  * about the package, the package's comment and tags, and the
       
    31  * classes in the package.
       
    32  * <p>
       
    33  * Each method whose return type is an array will return an empty
       
    34  * array (never null) when there are no objects in the result.
       
    35  *
       
    36  * @since 1.2
       
    37  * @author Kaiyang Liu (original)
       
    38  * @author Robert Field (rewrite)
       
    39  */
       
    40 public interface PackageDoc extends Doc {
       
    41 
       
    42     /**
       
    43      * Get all classes and interfaces in the package, filtered to the specified
       
    44      * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">access
       
    45      * modifier option</a>.
       
    46      *
       
    47      * @return       filtered classes and interfaces in this package
       
    48      * @param filter Specifying true filters according to the specified access
       
    49      *               modifier option.
       
    50      *               Specifying false includes all classes and interfaces
       
    51      *               regardless of access modifier option.
       
    52      * @since 1.4
       
    53      */
       
    54     ClassDoc[] allClasses(boolean filter);
       
    55 
       
    56     /**
       
    57      * Get all
       
    58      * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">included</a>
       
    59      * classes and interfaces in the package.  Same as allClasses(true).
       
    60      *
       
    61      * @return all included classes and interfaces in this package.
       
    62      */
       
    63     ClassDoc[] allClasses();
       
    64 
       
    65     /**
       
    66      * Get included
       
    67      * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#class">ordinary</a>
       
    68      * classes (that is, exclude exceptions, errors, enums, interfaces, and
       
    69      * annotation types)
       
    70      * in this package.
       
    71      *
       
    72      * @return included ordinary classes in this package.
       
    73      */
       
    74     ClassDoc[] ordinaryClasses();
       
    75 
       
    76     /**
       
    77      * Get included Exception classes in this package.
       
    78      *
       
    79      * @return included Exceptions in this package.
       
    80      */
       
    81     ClassDoc[] exceptions();
       
    82 
       
    83     /**
       
    84      * Get included Error classes in this package.
       
    85      *
       
    86      * @return included Errors in this package.
       
    87      */
       
    88     ClassDoc[] errors();
       
    89 
       
    90     /**
       
    91      * Get included enum types in this package.
       
    92      *
       
    93      * @return included enum types in this package.
       
    94      * @since 1.5
       
    95      */
       
    96     ClassDoc[] enums();
       
    97 
       
    98     /**
       
    99      * Get included interfaces in this package, omitting annotation types.
       
   100      *
       
   101      * @return included interfaces in this package.
       
   102      */
       
   103     ClassDoc[] interfaces();
       
   104 
       
   105     /**
       
   106      * Get included annotation types in this package.
       
   107      *
       
   108      * @return included annotation types in this package.
       
   109      * @since 1.5
       
   110      */
       
   111     AnnotationTypeDoc[] annotationTypes();
       
   112 
       
   113     /**
       
   114      * Get the annotations of this package.
       
   115      * Return an empty array if there are none.
       
   116      *
       
   117      * @return the annotations of this package.
       
   118      * @since 1.5
       
   119      */
       
   120     AnnotationDesc[] annotations();
       
   121 
       
   122     /**
       
   123      * Lookup a class or interface within this package.
       
   124      *
       
   125      * @param className A String containing the name of the class to look up.
       
   126      * @return ClassDoc of found class or interface,
       
   127      * or null if not found.
       
   128      */
       
   129     ClassDoc findClass(String className);
       
   130 }