Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
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 (309)
Collections:
Other Resources:
JDK 17 jdk.management.jfr.jmod - Management JFR Module
JDK 17 jdk.management.jfr.jmod is the JMOD file for JDK 17 Management Jfr module.
JDK 17 Management JFR module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.management.jfr.jmod.
JDK 17 Management JFR module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Management JFR module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.management.jfr.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/management/jfr/EventTypeInfo.java
/* * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package jdk.management.jfr; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.StringJoiner; import javax.management.openmbean.CompositeData; import jdk.jfr.Category; import jdk.jfr.EventType; import jdk.jfr.SettingDescriptor; /** * Management representation of an {@code EventType}. * * @see EventType * * @since 9 */ public final class EventTypeInfo { private final List<SettingDescriptorInfo> settings; private final long id; private final String name; private final String description; private final String label; private final List<String> categoryNames; // package private EventTypeInfo(EventType eventType) { this.settings = creatingSettingDescriptorInfos(eventType); this.id = eventType.getId(); this.name = eventType.getName(); this.label = eventType.getLabel(); this.description = eventType.getDescription(); this.categoryNames = eventType.getCategoryNames(); } private EventTypeInfo(CompositeData cd) { this.settings = createSettings(cd.get("settings")); this.id = (long) cd.get("id"); this.name = (String) cd.get("name"); this.label = (String) cd.get("label"); this.description = (String) cd.get("description"); this.categoryNames = createCategoryNames((Object[]) cd.get("category")); } private static List<String> createCategoryNames(Object[] array) { List<String> list = new ArrayList<>(array.length); for (int i = 0; i < array.length; i++) { list.add((String) array[i]); } return Collections.unmodifiableList(list); } private static List<SettingDescriptorInfo> creatingSettingDescriptorInfos(EventType eventType) { List<SettingDescriptor> settings = eventType.getSettingDescriptors(); List<SettingDescriptorInfo> settingDescriptorInfos = new ArrayList<>(settings.size()); for (SettingDescriptor s : settings) { settingDescriptorInfos.add(new SettingDescriptorInfo(s)); } return Collections.unmodifiableList(settingDescriptorInfos); } private static List<SettingDescriptorInfo> createSettings(Object settings) { if (settings != null && settings.getClass().isArray()) { Object[] settingsArray = (Object[]) settings; List<SettingDescriptorInfo> list = new ArrayList<>(settingsArray.length); for (Object cd : settingsArray) { if (cd instanceof CompositeData) { list.add(SettingDescriptorInfo.from((CompositeData) cd)); } } return Collections.unmodifiableList(list); } return Collections.emptyList(); } /** * Returns the label, a human-readable name, associated with the event type * for this {@code EventTypeInfo} (for example, {@code "Garbage Collection"}). * * @return the label, or {@code null} if a label is not set * * @see EventType#getLabel() */ public String getLabel() { return label; } /** * * Returns the list of human-readable names that makes up the category for this * {@code EventTypeInfo} (for example, {@code "Java Virtual Machine"} or {@code "Garbage Collector"}). * * @return an immutable list of category names, or a list with the name * {@code "Uncategorized"} if no category has been set * * @see EventType#getCategoryNames() * @see Category */ public List<String> getCategoryNames() { return categoryNames; } /** * Returns the unique ID for the event type associated with this * {@code EventTypeInfo}, not guaranteed to be the same for different Java * Virtual Machines (JVMs) instances. * * @return the ID * * @see EventType#getId() */ public long getId() { return id; } /** * Returns the name for the event type associated with this * {@code EventTypeInfo} (for example, {@code "jdk.GarbageCollection"}). * * @return the name, not {@code null} * * @see EventType#getName() */ public String getName() { return name; } /** * Returns a short sentence or two describing the event type associated with * this {@code EventTypeInfo}, for example * {@code "Garbage collection performed by the JVM""}. * * @return the description, or {@code null} if no description exists * * @see EventType#getDescription() */ public String getDescription() { return description; } /** * Returns settings for the event type associated with this * {@code EventTypeInfo}. * * @return the settings, not {@code null} * * @see EventType#getSettingDescriptors() */ public List<SettingDescriptorInfo> getSettingDescriptors() { return settings; } /** * Returns a description of this {@code EventTypeInfo}. * * @return description, not {@code null} */ @Override public String toString() { Stringifier s = new Stringifier(); s.add("id", id); s.add("name", name); s.add("label", label); s.add("description", description); StringJoiner sj = new StringJoiner(", ", "{", "}"); for (String categoryName : categoryNames) { sj.add(categoryName); } s.add("category", sj.toString()); return s.toString(); } /** * Returns an {@code EventType} represented by the specified * {@code CompositeData} * <p> * The supplied {@code CompositeData} must have the following item names and * item types to be valid. <blockquote> * <table class="striped"> * <caption>The name and type the specified CompositeData must contain</caption> * <thead> * <tr> * <th scope="col" style="text-align:left">Name</th> * <th scope="col" style="text-align:left">Type</th> * </tr> * </thead> * <tbody> * <tr> * <th scope="row">id</th> * <td>{@code Long}</td> * </tr> * <tr> * <th scope="row">name</th> * <td>{@code String}</td> * </tr> * <tr> * <th scope="row">label</th> * <td>{@code String}</td> * </tr> * <tr> * <th scope="row">description</th> * <td>{@code String}</td> * </tr> * <tr> * <th scope="row">category</th> * <td><code>ArrayType(1, SimpleType.STRING)</code></td> * </tr> * <tr> * <th scope="row">settings</th> * <td>{@code javax.management.openmbean.CompositeData[]} whose element type * is the mapped type for {@link SettingDescriptorInfo} as specified in the * {@link SettingDescriptorInfo#from} method.</td> * * </tr> * </tbody> * </table> * </blockquote> * * @param cd {@code CompositeData} representing the {@code EventTypeInfo} to * return * * @throws IllegalArgumentException if {@code cd} does not represent a valid * {@code EventTypeInfo} * * @return an {@code EventTypeInfo}, or {@code null} if {@code cd} is * {@code null} */ public static EventTypeInfo from(CompositeData cd) { if (cd == null) { return null; } return new EventTypeInfo(cd); } }
⏎ jdk/management/jfr/EventTypeInfo.java
Or download all of them as a single archive file:
File name: jdk.management.jfr-17.0.5-src.zip File size: 34348 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.naming.dns.jmod - Naming DNS Module
⇐ JDK 17 jdk.management.agent.jmod - Management Agent Module
2023-07-29, 1375👍, 0💬
Popular Posts:
ANTLR is a powerful parser generator for multiple programming languages including Java. ANTLR contai...
The JSR 105 XML Digital Signature 1.0.1 FCS implementation provides an API and implementation that a...
How to read XML document with XML Schema validation from socket connections with the socket\DelayedI...
Java Servlet 3.0 Specification API. JAR File Size and Download Location: File name: servlet-api.jar,...
JSP(tm) Standard Tag Library 1.0 implementation - Jakarta Taglibs hosts the Standard Taglib 1.0, an ...