01: package org.umlgraph.doclet;
02:
03: import com.sun.javadoc.ClassDoc;
04: import com.sun.javadoc.PackageDoc;
05:
06: public class PackageMatcher implements ClassMatcher {
07: protected PackageDoc packageDoc;
08:
09: public PackageMatcher(PackageDoc packageDoc) {
10: super ();
11: this .packageDoc = packageDoc;
12: }
13:
14: public boolean matches(ClassDoc cd) {
15: return cd.containingPackage().equals(packageDoc);
16: }
17:
18: public boolean matches(String name) {
19: for (ClassDoc cd : packageDoc.allClasses()) {
20: if (cd.qualifiedName().equals(name))
21: return true;
22: }
23: return false;
24: }
25:
26: }
|