• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 1998, 2006, 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 import com.google.doclava.annotation.Unused;
29 import com.google.doclava.annotation.Used;
30 
31 /**
32  * Represents a java package.  Provides access to information
33  * about the package, the package's comment and tags, and the
34  * classes in the package.
35  * <p>
36  * Each method whose return type is an array will return an empty
37  * array (never null) when there are no objects in the result.
38  *
39  * @since 1.2
40  * @author Kaiyang Liu (original)
41  * @author Robert Field (rewrite)
42  */
43 public interface PackageDoc extends Doc {
44 
45     /**
46      * Get all classes and interfaces in the package, filtered to the specified
47      * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">access
48      * modifier option</a>.
49      *
50      * @return       filtered classes and interfaces in this package
51      * @param filter Specifying true filters according to the specified access
52      *               modifier option.
53      *               Specifying false includes all classes and interfaces
54      *               regardless of access modifier option.
55      * @since 1.4
56      */
57     @Unused
allClasses(boolean filter)58     ClassDoc[] allClasses(boolean filter);
59 
60     /**
61      * Get all
62      * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">included</a>
63      * classes and interfaces in the package.  Same as allClasses(true).
64      *
65      * @return all included classes and interfaces in this package.
66      */
67     @Unused
allClasses()68     ClassDoc[] allClasses();
69 
70     /**
71      * Get included
72      * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#class">ordinary</a>
73      * classes (that is, exclude exceptions, errors, enums, interfaces, and
74      * annotation types)
75      * in this package.
76      *
77      * @return included ordinary classes in this package.
78      */
79     @Used
ordinaryClasses()80     ClassDoc[] ordinaryClasses();
81 
82     /**
83      * Get included Exception classes in this package.
84      *
85      * @return included Exceptions in this package.
86      */
87     @Used
exceptions()88     ClassDoc[] exceptions();
89 
90     /**
91      * Get included Error classes in this package.
92      *
93      * @return included Errors in this package.
94      */
95     @Used
errors()96     ClassDoc[] errors();
97 
98     /**
99      * Get included enum types in this package.
100      *
101      * @return included enum types in this package.
102      * @since 1.5
103      */
104     @Used
enums()105     ClassDoc[] enums();
106 
107     /**
108      * Get included interfaces in this package, omitting annotation types.
109      *
110      * @return included interfaces in this package.
111      */
112     @Used
interfaces()113     ClassDoc[] interfaces();
114 
115     /**
116      * Get included annotation types in this package.
117      *
118      * @return included annotation types in this package.
119      * @since 1.5
120      */
121     @Used
annotationTypes()122     AnnotationTypeDoc[] annotationTypes();
123 
124     /**
125      * Get the annotations of this package.
126      * Return an empty array if there are none.
127      *
128      * @return the annotations of this package.
129      * @since 1.5
130      */
131     @Unused
annotations()132     AnnotationDesc[] annotations();
133 
134     /**
135      * Lookup a class or interface within this package.
136      *
137      * @return ClassDoc of found class or interface,
138      * or null if not found.
139      */
140     @Unused
findClass(String className)141     ClassDoc findClass(String className);
142 }
143