// anti recursion flag.
this.isCheckStarted = true;
// get the state object and the target of this proxy
PublishedApiDoclet pad = (PublishedApiDoclet) getHDPStateUserObject();
Doc doc = (Doc)this.getInvocationTarget();
// determinate, if the target is to be included in the
// documentation: Include it, if either
//
this.isIncluded = pad.isIgnoreJavadocIsIncluded() // the global flag says so
|| doc.isIncluded() // the javadoc framework says so
|| // the "forceInclude"-tag of the target says so
tagPriority(doc,pad.getForceIncludeTag(),pad.getForceIncludeFilterPat()) > 0;
// if we already know, that the target is not to be included,
// we are ready.
if (! this.isIncluded)
return false;
// check the current target node and its parent nodes.
this.isIncluded = this.calcInclusionPriority(false) >= 0 ;
// if the default is "exclude", check, if the
// inclusion of just this target node is required,
// because one of the child elements is included
if (! this.isIncluded) {
boolean inclusionRequired = false;
if (doc instanceof PackageDoc) {
// nested nodes are classes, therefore check, if the
// package contains any classes to be documented
PackageDoc pd = (PackageDoc) dynamicProxyInstance();
inclusionRequired = pd.allClasses().length > 0;
} else if (doc instanceof ClassDoc) {
// nested nodes are constructors, methods or fields.
ClassDoc cd = (ClassDoc) dynamicProxyInstance();
inclusionRequired =
cd.constructors().length > 0 ||
cd.methods().length > 0 ||
cd.fields().length > 0 ||
cd.enumConstants().length > 0;
if (! inclusionRequired && cd instanceof AnnotationTypeDoc) {
AnnotationTypeDoc atd = (AnnotationTypeDoc) cd;
inclusionRequired = atd.elements().length > 0;
}
}
if (inclusionRequired) {
debug("detected required inclusion of: "+doc.toString());
this.isIncluded = true;
}
}
return this.isIncluded;
} finally {