duke@1: /* ohair@554: * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved. duke@1: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. duke@1: * duke@1: * This code is free software; you can redistribute it and/or modify it duke@1: * under the terms of the GNU General Public License version 2 only, as ohair@554: * published by the Free Software Foundation. Oracle designates this duke@1: * particular file as subject to the "Classpath" exception as provided ohair@554: * by Oracle in the LICENSE file that accompanied this code. duke@1: * duke@1: * This code is distributed in the hope that it will be useful, but WITHOUT duke@1: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or duke@1: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License duke@1: * version 2 for more details (a copy is included in the LICENSE file that duke@1: * accompanied this code). duke@1: * duke@1: * You should have received a copy of the GNU General Public License version duke@1: * 2 along with this work; if not, write to the Free Software Foundation, duke@1: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. duke@1: * ohair@554: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@554: * or visit www.oracle.com if you need additional information or have any ohair@554: * questions. duke@1: */ duke@1: duke@1: package com.sun.javadoc; duke@1: duke@1: /** duke@1: * Represents a java package. Provides access to information duke@1: * about the package, the package's comment and tags, and the duke@1: * classes in the package. duke@1: *

duke@1: * Each method whose return type is an array will return an empty duke@1: * array (never null) when there are no objects in the result. duke@1: * duke@1: * @since 1.2 duke@1: * @author Kaiyang Liu (original) duke@1: * @author Robert Field (rewrite) duke@1: */ duke@1: public interface PackageDoc extends Doc { duke@1: duke@1: /** duke@1: * Get all classes and interfaces in the package, filtered to the specified duke@1: * access duke@1: * modifier option. duke@1: * duke@1: * @return filtered classes and interfaces in this package duke@1: * @param filter Specifying true filters according to the specified access duke@1: * modifier option. duke@1: * Specifying false includes all classes and interfaces duke@1: * regardless of access modifier option. duke@1: * @since 1.4 duke@1: */ duke@1: ClassDoc[] allClasses(boolean filter); duke@1: duke@1: /** duke@1: * Get all duke@1: * included duke@1: * classes and interfaces in the package. Same as allClasses(true). duke@1: * duke@1: * @return all included classes and interfaces in this package. duke@1: */ duke@1: ClassDoc[] allClasses(); duke@1: duke@1: /** duke@1: * Get included duke@1: * ordinary duke@1: * classes (that is, exclude exceptions, errors, enums, interfaces, and duke@1: * annotation types) duke@1: * in this package. duke@1: * duke@1: * @return included ordinary classes in this package. duke@1: */ duke@1: ClassDoc[] ordinaryClasses(); duke@1: duke@1: /** duke@1: * Get included Exception classes in this package. duke@1: * duke@1: * @return included Exceptions in this package. duke@1: */ duke@1: ClassDoc[] exceptions(); duke@1: duke@1: /** duke@1: * Get included Error classes in this package. duke@1: * duke@1: * @return included Errors in this package. duke@1: */ duke@1: ClassDoc[] errors(); duke@1: duke@1: /** duke@1: * Get included enum types in this package. duke@1: * duke@1: * @return included enum types in this package. duke@1: * @since 1.5 duke@1: */ duke@1: ClassDoc[] enums(); duke@1: duke@1: /** duke@1: * Get included interfaces in this package, omitting annotation types. duke@1: * duke@1: * @return included interfaces in this package. duke@1: */ duke@1: ClassDoc[] interfaces(); duke@1: duke@1: /** duke@1: * Get included annotation types in this package. duke@1: * duke@1: * @return included annotation types in this package. duke@1: * @since 1.5 duke@1: */ duke@1: AnnotationTypeDoc[] annotationTypes(); duke@1: duke@1: /** duke@1: * Get the annotations of this package. duke@1: * Return an empty array if there are none. duke@1: * duke@1: * @return the annotations of this package. duke@1: * @since 1.5 duke@1: */ duke@1: AnnotationDesc[] annotations(); duke@1: duke@1: /** duke@1: * Lookup a class or interface within this package. duke@1: * duke@1: * @return ClassDoc of found class or interface, duke@1: * or null if not found. duke@1: */ duke@1: ClassDoc findClass(String className); duke@1: }