Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JDK 17 jdk.javadoc.jmod - Java Document Tool
JDK 17 jdk.javadoc.jmod is the JMOD file for JDK 17 Java Document tool,
which can be invoked by the "javadoc" command.
JDK 17 Java Document tool compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.javadoc.jmod.
JDK 17 Java Document tool compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Java Document tool source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.javadoc.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/javadoc/internal/doclets/toolkit/util/SummaryAPIListBuilder.java
/*
* Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package jdk.javadoc.internal.doclets.toolkit.util;
import java.util.*;
import java.util.function.Predicate;
import javax.lang.model.element.Element;
import javax.lang.model.element.ModuleElement;
import javax.lang.model.element.PackageElement;
import javax.lang.model.element.RecordComponentElement;
import javax.lang.model.element.TypeElement;
import jdk.javadoc.internal.doclets.toolkit.BaseConfiguration;
/**
* Build list of all the summary packages, classes, constructors, fields and methods.
*
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*/
public class SummaryAPIListBuilder {
/**
* List of summary type Lists.
*/
private final Map<SummaryElementKind, SortedSet<Element>> summaryMap;
private final BaseConfiguration configuration;
protected final Utils utils;
private final Predicate<Element> belongsToSummary;
public enum SummaryElementKind {
MODULE,
PACKAGE,
INTERFACE,
CLASS,
ENUM,
EXCEPTION, // no ElementKind mapping
ERROR, // no ElementKind mapping
RECORD_CLASS,
ANNOTATION_TYPE,
FIELD,
METHOD,
CONSTRUCTOR,
ENUM_CONSTANT,
ANNOTATION_TYPE_MEMBER // no ElementKind mapping
};
/**
* Constructor.
*
* @param configuration the current configuration of the doclet
*/
public SummaryAPIListBuilder(BaseConfiguration configuration,
Predicate<Element> belongsToSummary) {
this.configuration = configuration;
this.utils = configuration.utils;
this.belongsToSummary = belongsToSummary;
summaryMap = new EnumMap<>(SummaryElementKind.class);
for (SummaryElementKind kind : SummaryElementKind.values()) {
summaryMap.put(kind, createSummarySet());
}
}
public boolean isEmpty() {
return summaryMap.values().stream().allMatch(Set::isEmpty);
}
/**
* Build the sorted list of all the summary APIs in this run.
* Build separate lists for summary modules, packages, classes, constructors,
* methods and fields.
*/
protected void buildSummaryAPIInfo() {
SortedSet<ModuleElement> modules = configuration.modules;
SortedSet<Element> mset = summaryMap.get(SummaryElementKind.MODULE);
for (Element me : modules) {
if (belongsToSummary.test(me)) {
mset.add(me);
handleElement(me);
}
}
SortedSet<PackageElement> packages = configuration.packages;
SortedSet<Element> pset = summaryMap.get(SummaryElementKind.PACKAGE);
for (Element pe : packages) {
if (belongsToSummary.test(pe)) {
pset.add(pe);
handleElement(pe);
}
}
for (Element e : configuration.getIncludedTypeElements()) {
TypeElement te = (TypeElement)e;
SortedSet<Element> eset;
if (belongsToSummary.test(e)) {
switch (e.getKind()) {
case ANNOTATION_TYPE -> {
eset = summaryMap.get(SummaryElementKind.ANNOTATION_TYPE);
eset.add(e);
}
case CLASS -> {
if (utils.isError(te)) {
eset = summaryMap.get(SummaryElementKind.ERROR);
} else if (utils.isException(te)) {
eset = summaryMap.get(SummaryElementKind.EXCEPTION);
} else {
eset = summaryMap.get(SummaryElementKind.CLASS);
}
eset.add(e);
}
case INTERFACE -> {
eset = summaryMap.get(SummaryElementKind.INTERFACE);
eset.add(e);
}
case ENUM -> {
eset = summaryMap.get(SummaryElementKind.ENUM);
eset.add(e);
}
case RECORD -> {
eset = summaryMap.get(SummaryElementKind.RECORD_CLASS);
eset.add(e);
}
}
handleElement(te);
}
composeSummaryList(summaryMap.get(SummaryElementKind.FIELD),
utils.getFields(te));
composeSummaryList(summaryMap.get(SummaryElementKind.METHOD),
utils.getMethods(te));
composeSummaryList(summaryMap.get(SummaryElementKind.CONSTRUCTOR),
utils.getConstructors(te));
if (utils.isEnum(e)) {
composeSummaryList(summaryMap.get(SummaryElementKind.ENUM_CONSTANT),
utils.getEnumConstants(te));
}
if (utils.isRecord(te)) {
for (RecordComponentElement component : te.getRecordComponents()) {
if (belongsToSummary.test(component)) {
throw new AssertionError("record components not supported in summary builders: " +
"component: " + component.getSimpleName() +
" of record: " + te.getQualifiedName());
}
}
}
if (utils.isAnnotationType(e)) {
composeSummaryList(summaryMap.get(SummaryElementKind.ANNOTATION_TYPE_MEMBER),
utils.getAnnotationMembers(te));
}
}
}
/**
* Add the members into a single list of summary members.
*
* @param sset set of summary elements
* @param members members to be added in the list
*/
private void composeSummaryList(SortedSet<Element> sset, List<? extends Element> members) {
for (Element member : members) {
if (belongsToSummary.test(member)) {
sset.add(member);
handleElement(member);
}
}
}
/**
* Return the list of summary elements of a given type.
*
* @param kind the SummaryElementKind
* @return
*/
public SortedSet<Element> getSet(SummaryElementKind kind) {
return summaryMap.get(kind);
}
/**
* Return true if the list of a given type has size greater than 0.
*
* @param kind the type of list being checked.
*/
public boolean hasDocumentation(SummaryElementKind kind) {
return !summaryMap.get(kind).isEmpty();
}
/**
* Additional extra processing of an included element.
*
* @param e element to process
*/
protected void handleElement(Element e) {}
/**
* Create a summary set of elements.
*
* @return a summary set
*/
protected final SortedSet<Element> createSummarySet() {
return new TreeSet<>(utils.comparators.makeSummaryComparator());
}
}
⏎ jdk/javadoc/internal/doclets/toolkit/util/SummaryAPIListBuilder.java
Or download all of them as a single archive file:
File name: jdk.javadoc-17.0.5-src.zip File size: 587730 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.jcmd.jmod - JCmd Tool
2023-08-17, ≈35🔥, 0💬
Popular Posts:
Snappy-Java is a Java port of the "snappy", a fast C++ compresser/decompresser developed by Google. ...
JDK 11 java.sql.rowset.jmod is the JMOD file for JDK 11 SQL Rowset module. JDK 11 SQL Rowset module ...
What Is ojdbc5.jar for Oracle 11g R1? ojdbc5.jar for Oracle 11g R1 is the JAR files of ojdbc.jar, JD...
What Is commons-io-2.11.jar? commons-io-2.11.jar is the JAR file for Commons IO 2.5, which is a libr...
The Apache FontBox library is an open source Java tool to obtain low level information from font fil...