for (PackageDoc p : orig) {
// wrap the package
ClassLoader loader = WonderlandDoclet.class.getClassLoader();
Class<?>[] interfaces = new Class<?>[] { PackageDoc.class };
InvocationHandler handler = new PackageDocWrapper(p, "ExperimentalAPI");
PackageDoc pkg =
(PackageDoc) Proxy.newProxyInstance(loader, interfaces, handler);
if (pkg.allClasses().length > 0) {
wrapped.add(pkg);
}
}
return wrapped.toArray(new PackageDoc[0]);