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.jfr.jmod - JFR Module
JDK 17 jdk.jfr.jmod is the JMOD file for JDK 17 JFR module.
JDK 17 JFR module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.jfr.jmod.
JDK 17 JFR module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 JFR module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.jfr.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/jfr/internal/AnnotationConstruct.java
/*
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package jdk.jfr.internal;
import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.List;
import jdk.jfr.AnnotationElement;
import jdk.jfr.Description;
import jdk.jfr.Label;
import jdk.jfr.Unsigned;
public final class AnnotationConstruct {
private static final class AnnotationInvokationHandler implements InvocationHandler {
private final AnnotationElement annotationElement;
AnnotationInvokationHandler(AnnotationElement a) {
this.annotationElement = a;
}
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
String methodName = method.getName();
int parameters = method.getTypeParameters().length;
if (parameters == 0 && annotationElement.hasValue(methodName)) {
return annotationElement.getValue(methodName);
}
throw new UnsupportedOperationException("Flight Recorder proxy only supports members declared in annotation interfaces, i.e. not toString, equals etc.");
}
}
private List<AnnotationElement> annotationElements;
private byte unsignedFlag = -1;
public AnnotationConstruct(List<AnnotationElement> elements) {
this.annotationElements = List.copyOf(elements);
}
public AnnotationConstruct() {
this(List.of());
}
public void setAnnotationElements(List<AnnotationElement> elements) {
annotationElements = List.copyOf(elements);
}
public String getLabel() {
Label label = getAnnotation(Label.class);
if (label == null) {
return null;
}
return label.value();
}
public String getDescription() {
Description description = getAnnotation(Description.class);
if (description == null) {
return null;
}
return description.value();
}
@SuppressWarnings("unchecked")
public final <T> T getAnnotation(Class<? extends Annotation> clazz) {
AnnotationElement ae = getAnnotationElement(clazz);
if (ae != null) {
return (T) Proxy.newProxyInstance(clazz.getClassLoader(), new Class<?>[] { clazz }, new AnnotationInvokationHandler(ae));
}
return null;
}
public List<AnnotationElement> getUnmodifiableAnnotationElements() {
return annotationElements;
}
private AnnotationElement getAnnotationElement(Class<? extends Annotation> clazz) {
// if multiple annotation elements with the same name exists, prioritize
// the one with the same id. Note, id alone is not a guarantee, since it
// may differ between JVM instances.
long id = Type.getTypeId(clazz);
String className = clazz.getName();
for (AnnotationElement a : getUnmodifiableAnnotationElements()) {
if (a.getTypeId() == id && a.getTypeName().equals(className)) {
return a;
}
}
for (AnnotationElement a : getUnmodifiableAnnotationElements()) {
if (a.getTypeName().equals(className)) {
return a;
}
}
return null;
}
public boolean hasUnsigned() {
// Must be initialized lazily since some annotation elements
// are added after construction
if (unsignedFlag < 0) {
Unsigned unsigned = getAnnotation(Unsigned.class);
unsignedFlag = (byte) (unsigned == null ? 0 :1);
}
return unsignedFlag == (byte)1 ? true : false;
}
}
⏎ jdk/jfr/internal/AnnotationConstruct.java
Or download all of them as a single archive file:
File name: jdk.jfr-17.0.5-src.zip File size: 363343 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.jlink.jmod - JLink Tool
2023-04-17, ≈108🔥, 0💬
Popular Posts:
JRE 8 plugin.jar is the JAR file for JRE 8 Java Control Panel Plugin interface and tools. JRE (Java ...
JDK 17 jdk.compiler.jmod is the JMOD file for JDK 17 Compiler tool, which can be invoked by the "jav...
JRE 8 deploy.jar is the JAR file for JRE 8 Java Control Panel and other deploy tools. JRE (Java Runt...
What Is mail.jar of JavaMail 1.3? I got the JAR file from javamail-1_3.zip. mail.jar in javamail-1_3...
The Web Services Description Language for Java Toolkit (WSDL4J), Release 1.6.2, allows the creation,...