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.jdeps.jmod - JDeps Tool
JDK 17 jdk.jdeps.jmod is the JMOD file for JDK 17 JDeps tool,
which can be invoked by the "jdeps" command.
JDK 17 JDeps tool compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.jdeps.jmod.
JDK 17 JDeps tool compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 JDeps tool source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.jdeps.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/tools/jdeprscan/LoadProc.java
/*
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.tools.jdeprscan;
import java.lang.annotation.IncompleteAnnotationException;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.Messager;
import javax.annotation.processing.ProcessingEnvironment;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.annotation.processing.SupportedSourceVersion;
import javax.lang.model.SourceVersion;
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.TypeElement;
import javax.lang.model.type.ArrayType;
import javax.lang.model.type.DeclaredType;
import javax.lang.model.type.ExecutableType;
import javax.lang.model.type.TypeMirror;
import javax.lang.model.util.Elements;
import javax.tools.Diagnostic;
/**
* Annotation processor for the Deprecation Scanner tool.
* Examines APIs for deprecated elements and records information
*
*/
@SupportedAnnotationTypes("java.lang.Deprecated")
public class LoadProc extends AbstractProcessor {
Elements elements;
Messager messager;
final List<DeprData> deprList = new ArrayList<>();
public LoadProc() {
}
@Override
public void init(ProcessingEnvironment pe) {
super.init(pe);
elements = pe.getElementUtils();
messager = pe.getMessager();
}
@Override
public SourceVersion getSupportedSourceVersion() {
return SourceVersion.latest();
}
@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
if (roundEnv.processingOver()) {
return false;
}
// Assume annotations contains only @Deprecated.
// Note: no way to get deprecated packages, since
// @Deprecated is ignored in package-info.java files.
Set<? extends Element> set = roundEnv.getElementsAnnotatedWith(Deprecated.class);
for (Element e : set) {
ElementKind kind = e.getKind();
Deprecated depr = e.getAnnotation(Deprecated.class);
switch (kind) {
case CLASS:
case INTERFACE:
case ENUM:
case ANNOTATION_TYPE:
addType(kind, (TypeElement)e, depr);
break;
case CONSTRUCTOR:
case ENUM_CONSTANT:
case FIELD:
case METHOD:
Element encl = e.getEnclosingElement();
ElementKind enclKind = encl.getKind();
switch (enclKind) {
case CLASS:
case INTERFACE:
case ENUM:
case ANNOTATION_TYPE:
String detail = getDetail(e);
addMember(kind, (TypeElement)encl, detail, depr);
break;
default:
messager.printMessage(Diagnostic.Kind.WARNING,
"element " + e +
" within unknown enclosing element " + encl +
" of kind " + enclKind, e);
break;
}
break;
default:
messager.printMessage(Diagnostic.Kind.WARNING,
"unknown element " + e +
" of kind " + kind +
" within " + e.getEnclosingElement(), e);
break;
}
}
return true;
}
public List<DeprData> getDeprecations() {
return deprList;
}
String getDetail(Element e) {
if (e.getKind().isField()) {
return e.getSimpleName().toString();
} else {
// method or constructor
ExecutableElement ee = (ExecutableElement) e;
String ret;
ret = desc(ee.getReturnType());
List<? extends TypeMirror> parameterTypes = ((ExecutableType)ee.asType()).getParameterTypes();
String parms = parameterTypes.stream()
.map(this::desc)
.collect(Collectors.joining());
return ee.getSimpleName().toString() + "(" + parms + ")" + ret;
}
}
String desc(TypeMirror tm) {
switch (tm.getKind()) {
case BOOLEAN:
return "Z";
case BYTE:
return "B";
case SHORT:
return "S";
case CHAR:
return "C";
case INT:
return "I";
case LONG:
return "J";
case FLOAT:
return "F";
case DOUBLE:
return "D";
case VOID:
return "V";
case DECLARED:
String s =
((TypeElement)((DeclaredType)tm).asElement()).getQualifiedName().toString();
s = s.replace('.', '/');
return "L" + s + ";";
case ARRAY:
return "[" + desc(((ArrayType)tm).getComponentType());
default:
return tm.getKind().toString();
}
}
void addType(ElementKind kind, TypeElement type, Deprecated dep) {
addData(kind, type, "", dep);
}
void addMember(ElementKind kind, TypeElement type, String nameSig, Deprecated dep) {
addData(kind, type, nameSig, dep);
}
void addData(ElementKind kind, TypeElement type, String nameSig, Deprecated dep) {
String typeName = elements.getBinaryName(type).toString().replace('.', '/');
String since = "";
try {
since = dep.since();
} catch (IncompleteAnnotationException ignore) { }
boolean forRemoval = false;
try {
forRemoval = dep.forRemoval();
} catch (IncompleteAnnotationException ignore) { }
deprList.add(new DeprData(kind, type, typeName, nameSig, since, forRemoval));
}
}
⏎ com/sun/tools/jdeprscan/LoadProc.java
Or download all of them as a single archive file:
File name: jdk.jdeps-17.0.5-src.zip File size: 258425 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.jdi.jmod - JDI Tool
2023-04-17, ≈22🔥, 0💬
Popular Posts:
JDK 17 java.base.jmod is the JMOD file for JDK 17 Base module. JDK 17 Base module compiled class fil...
SLF4J API is a simple API that allows to plug in any desired logging library at deployment time. Her...
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...
commons-lang-1.0.1.jar is the JAR file for Apache Commons Lang 1.0.1, which provides a host of helpe...
JDK 17 java.compiler.jmod is the JMOD file for JDK 17 Compiler module. JDK 17 Compiler module compil...