/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Represents a java package. Provides access to information
* about the package, the package's comment and tags, and the
* classes in the package.
*
* @since 1.2
* @author Kaiyang Liu (original)
* @author Robert Field (rewrite)
* @author Neal Gafter (rewrite)
* @author Scott Seligman (package-info.java)
*/
/**
* Constructor
*/
}
/**
* Constructor
*/
super(env, documentation);
}
}
super.setRawCommentText(rawDocumentation);
checkDoc();
}
/**
* Do lazy initialization of "documentation" string.
*/
if (documentation != null)
return documentation;
// read from file
try {
} catch (IOException exc) {
documentation = "";
}
} else {
// no doc file to be had
documentation = "";
}
return documentation;
}
/**
* Cache of all classes contained in this package, including
* member classes of those classes, and their member classes, etc.
* Includes only those classes at the specified protection level
* and weaker.
*/
/**
* Cache of all classes contained in this package, including
* member classes of those classes, and their member classes, etc.
*/
/**
* Return a list of all classes contained in this package, including
* member classes of those classes, and their member classes, etc.
*/
return allClasses;
}
return allClassesFiltered;
}
if (c != null && !c.isSynthetic())
}
}
if (filtered)
else
}
/**
* Add all included classes (including Exceptions and Errors)
* and interfaces.
*/
}
/**
* Get all classes (including Exceptions and Errors)
* and interfaces.
* @since J2SE1.4.
*
* @return all classes and interfaces in this package, filtered to include
* only the included classes if filter==true.
*/
}
/**
* Get all included classes (including Exceptions and Errors)
* and interfaces. Same as allClasses(true).
*
* @return all included classes and interfaces in this package.
*/
return allClasses(true);
}
/**
* Get ordinary classes (that is, exclude exceptions, errors,
* enums, interfaces, and annotation types) in this package.
*
* @return included ordinary classes in this package.
*/
for (ClassDocImpl c : getClasses(true)) {
if (c.isOrdinaryClass()) {
}
}
}
/**
* Get Exception classes in this package.
*
* @return included Exceptions in this package.
*/
for (ClassDocImpl c : getClasses(true)) {
if (c.isException()) {
}
}
}
/**
* Get Error classes in this package.
*
* @return included Errors in this package.
*/
for (ClassDocImpl c : getClasses(true)) {
if (c.isError()) {
}
}
}
/**
* Get included enum types in this package.
*
* @return included enum types in this package.
*/
for (ClassDocImpl c : getClasses(true)) {
if (c.isEnum()) {
}
}
}
/**
* Get included interfaces in this package, omitting annotation types.
*
* @return included interfaces in this package.
*/
for (ClassDocImpl c : getClasses(true)) {
if (c.isInterface()) {
}
}
}
/**
* Get included annotation types in this package.
*
* @return included annotation types in this package.
*/
new ListBuffer<AnnotationTypeDocImpl>();
for (ClassDocImpl c : getClasses(true)) {
if (c.isAnnotationType()) {
}
}
}
/**
* Get the annotations of this package.
* Return an empty array if there are none.
*/
int i = 0;
}
return res;
}
/**
* Lookup for a class within this package.
*
* @return ClassDocImpl of found class, or null if not found.
*/
final boolean filtered = true;
return c;
}
}
return null;
}
/**
* Return true if this package is included in the active set.
*/
public boolean isIncluded() {
return isIncluded;
}
/**
* Get package name.
*
* Note that we do not provide a means of obtaining the simple
* name of a package -- package names are always returned in their
* uniquely qualified form.
*/
return qualifiedName();
}
/**
* Get package name.
*/
// Some bogus tests depend on the interned "" being returned.
// See 6457276.
}
/**
* set doc path for an unzipped directory
*/
setDocPath = true;
return;
checkDoc();
}
}
// Has checkDoc() sounded off yet?
private boolean checkDocWarningEmitted = false;
/**
* Invoked when a source of package doc comments is located.
* Emits a diagnostic if this is the second one.
*/
private void checkDoc() {
if (foundDoc) {
if (!checkDocWarningEmitted) {
checkDocWarningEmitted = true;
}
} else {
foundDoc = true;
}
}
/**
* Return the source position of the entity, or null if
* no position is available.
*/
}
}