code: @Deprecated
      public PackageDoc[] importedPackages() {
          // information is not available for binary classfiles
          if (tsym.sourcefile == null) return new PackageDoc[0];
  
          ListBuffer<PackageDocImpl> importedPackages = new ListBuffer<>();
  
          //### Add the implicit "import java.lang.*" to the result
          Names names = tsym.name.table.names;
          importedPackages.append(env.getPackageDoc(env.syms.enterPackage(env.syms.java_base, names.java_lang)));
  
          Env<AttrContext> compenv = env.enter.getEnv(tsym);
          if (compenv == null) return new PackageDocImpl[0];
  
          for (JCTree t : compenv.toplevel.defs) {
              if (t.hasTag(IMPORT)) {
                  JCTree imp = ((JCImport) t).qualid;
                  if (TreeInfo.name(imp) == names.asterisk) {
                      JCFieldAccess sel = (JCFieldAccess)imp;
                      Symbol s = sel.selected.type.tsym;
                      PackageDocImpl pdoc = env.getPackageDoc(s.packge());
                      if (!importedPackages.contains(pdoc))
                          importedPackages.append(pdoc);
                  }
              }
          }
  
          return importedPackages.toArray(new PackageDocImpl[importedPackages.length()]);
      }
docs: Get the list of packages declared as imported.
  These are called "type-import-on-demand declarations" in the JLS.
  This method is deprecated in the ClassDoc interface.
  
  @return an array of PackageDocImpl representing the imported packages.
  
  ###NOTE: the syntax supports importing all inner classes from a class as well.
  @deprecated  Import declarations are implementation details that
  should not be exposed here.  In addition, this method's
  return type does not allow for all type-import-on-demand
  declarations to be returned.