216 pkgSet.add(pkg); 217 List<Element> inPkg = map.get(pkg); 218 if (inPkg == null) { 219 inPkg = new ArrayList<>(); 220 map.put(pkg, inPkg); 221 } 222 inPkg.add(e); 223 } 224 } 225 return map; 226 } 227 228 /** 229 * Generate a class page. 230 * 231 * @throws DocFileIOException if there is a problem while generating the documentation 232 */ 233 public static void generate(HtmlConfiguration configuration, ClassUseMapper mapper, 234 TypeElement typeElement) throws DocFileIOException { 235 ClassUseWriter clsgen; 236 DocPath path = DocPath.forPackage(configuration.utils, typeElement) 237 .resolve(DocPaths.CLASS_USE) 238 .resolve(DocPath.forName(configuration.utils, typeElement)); 239 clsgen = new ClassUseWriter(configuration, mapper, path, typeElement); 240 clsgen.generateClassUseFile(); 241 } 242 243 /** 244 * Generate the class use elements. 245 * 246 * @throws DocFileIOException if there is a problem while generating the documentation 247 */ 248 protected void generateClassUseFile() throws DocFileIOException { 249 HtmlTree body = getClassUseHeader(); 250 HtmlTree div = new HtmlTree(HtmlTag.DIV); 251 div.setStyle(HtmlStyle.classUseContainer); 252 if (pkgSet.size() > 0) { 253 addClassUse(div); 254 } else { 255 div.addContent(contents.getContent("doclet.ClassUse_No.usage.of.0", 256 utils.getFullyQualifiedName(typeElement))); 257 } 258 if (configuration.allowTag(HtmlTag.MAIN)) { | 216 pkgSet.add(pkg); 217 List<Element> inPkg = map.get(pkg); 218 if (inPkg == null) { 219 inPkg = new ArrayList<>(); 220 map.put(pkg, inPkg); 221 } 222 inPkg.add(e); 223 } 224 } 225 return map; 226 } 227 228 /** 229 * Generate a class page. 230 * 231 * @throws DocFileIOException if there is a problem while generating the documentation 232 */ 233 public static void generate(HtmlConfiguration configuration, ClassUseMapper mapper, 234 TypeElement typeElement) throws DocFileIOException { 235 ClassUseWriter clsgen; 236 DocPath path = configuration.docPaths.forPackage(typeElement) 237 .resolve(DocPaths.CLASS_USE) 238 .resolve(configuration.docPaths.forName( typeElement)); 239 clsgen = new ClassUseWriter(configuration, mapper, path, typeElement); 240 clsgen.generateClassUseFile(); 241 } 242 243 /** 244 * Generate the class use elements. 245 * 246 * @throws DocFileIOException if there is a problem while generating the documentation 247 */ 248 protected void generateClassUseFile() throws DocFileIOException { 249 HtmlTree body = getClassUseHeader(); 250 HtmlTree div = new HtmlTree(HtmlTag.DIV); 251 div.setStyle(HtmlStyle.classUseContainer); 252 if (pkgSet.size() > 0) { 253 addClassUse(div); 254 } else { 255 div.addContent(contents.getContent("doclet.ClassUse_No.usage.of.0", 256 utils.getFullyQualifiedName(typeElement))); 257 } 258 if (configuration.allowTag(HtmlTag.MAIN)) { |