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 11 java.management.jmod - Management Module
JDK 11 java.management.jmod is the JMOD file for JDK 11 Management module.
JDK 11 Management module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.management.jmod.
JDK 11 Management module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Management module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.management.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/jmx/mbeanserver/MXBeanMapping.java
/* * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.jmx.mbeanserver; import java.io.InvalidObjectException; import java.lang.reflect.Type; import javax.management.openmbean.OpenDataException; import javax.management.openmbean.OpenType; /** * <p>A custom mapping between Java types and Open types for use in MXBeans. * To define such a mapping, subclass this class and define at least the * {@link #fromOpenValue fromOpenValue} and {@link #toOpenValue toOpenValue} * methods, and optionally the {@link #checkReconstructible} method. * Then either use an {@link MXBeanMappingClass} annotation on your custom * Java types, or include this MXBeanMapping in an * {@link MXBeanMappingFactory}.</p> * * <p>For example, suppose we have a class {@code MyLinkedList}, which looks * like this:</p> * * <pre> * public class MyLinkedList { * public MyLinkedList(String name, MyLinkedList next) {...} * public String getName() {...} * public MyLinkedList getNext() {...} * } * </pre> * * <p>This is not a valid type for MXBeans, because it contains a * self-referential property "next" defined by the {@code getNext()} * method. MXBeans do not support recursive types. So we would like * to specify a mapping for {@code MyLinkedList} explicitly. When an * MXBean interface contains {@code MyLinkedList}, that will be mapped * into a {@code String[]}, which is a valid Open Type.</p> * * <p>To define this mapping, we first subclass {@code MXBeanMapping}:</p> * * <pre> * public class MyLinkedListMapping extends MXBeanMapping { * public MyLinkedListMapping(Type type) throws OpenDataException { * super(MyLinkedList.class, ArrayType.getArrayType(SimpleType.STRING)); * if (type != MyLinkedList.class) * throw new OpenDataException("Mapping only valid for MyLinkedList"); * } * * {@literal @Override} * public Object fromOpenValue(Object openValue) throws InvalidObjectException { * String[] array = (String[]) openValue; * MyLinkedList list = null; * for (int i = array.length - 1; i >= 0; i--) * list = new MyLinkedList(array[i], list); * return list; * } * * {@literal @Override} * public Object toOpenValue(Object javaValue) throws OpenDataException { * ArrayList<String> array = new ArrayList<String>(); * for (MyLinkedList list = (MyLinkedList) javaValue; list != null; * list = list.getNext()) * array.add(list.getName()); * return array.toArray(new String[0]); * } * } * </pre> * * <p>The call to the superclass constructor specifies what the * original Java type is ({@code MyLinkedList.class}) and what Open * Type it is mapped to ({@code * ArrayType.getArrayType(SimpleType.STRING)}). The {@code * fromOpenValue} method says how we go from the Open Type ({@code * String[]}) to the Java type ({@code MyLinkedList}), and the {@code * toOpenValue} method says how we go from the Java type to the Open * Type.</p> * * <p>With this mapping defined, we can annotate the {@code MyLinkedList} * class appropriately:</p> * * <pre> * {@literal @MXBeanMappingClass}(MyLinkedListMapping.class) * public class MyLinkedList {...} * </pre> * * <p>Now we can use {@code MyLinkedList} in an MXBean interface and it * will work.</p> * * <p>If we are unable to modify the {@code MyLinkedList} class, * we can define an {@link MXBeanMappingFactory}. See the documentation * of that class for further details.</p> * * @see <a href="../MXBean.html#custom">MXBean specification, section * "Custom MXBean type mappings"</a> */ public abstract class MXBeanMapping { private final Type javaType; private final OpenType<?> openType; private final Class<?> openClass; /** * <p>Construct a mapping between the given Java type and the given * Open Type.</p> * * @param javaType the Java type (for example, {@code MyLinkedList}). * @param openType the Open Type (for example, {@code * ArrayType.getArrayType(SimpleType.STRING)}) * * @throws NullPointerException if either argument is null. */ protected MXBeanMapping(Type javaType, OpenType<?> openType) { if (javaType == null || openType == null) throw new NullPointerException("Null argument"); this.javaType = javaType; this.openType = openType; this.openClass = makeOpenClass(javaType, openType); } /** * <p>The Java type that was supplied to the constructor.</p> * @return the Java type that was supplied to the constructor. */ public final Type getJavaType() { return javaType; } /** * <p>The Open Type that was supplied to the constructor.</p> * @return the Open Type that was supplied to the constructor. */ public final OpenType<?> getOpenType() { return openType; } /** * <p>The Java class that corresponds to instances of the * {@linkplain #getOpenType() Open Type} for this mapping.</p> * @return the Java class that corresponds to instances of the * Open Type for this mapping. * @see OpenType#getClassName */ public final Class<?> getOpenClass() { return openClass; } private static Class<?> makeOpenClass(Type javaType, OpenType<?> openType) { if (javaType instanceof Class<?> && ((Class<?>) javaType).isPrimitive()) return (Class<?>) javaType; try { String className = openType.getClassName(); return Class.forName(className, false, MXBeanMapping.class.getClassLoader()); } catch (ClassNotFoundException e) { throw new RuntimeException(e); // should not happen } } /** * <p>Convert an instance of the Open Type into the Java type. * @param openValue the value to be converted. * @return the converted value. * @throws InvalidObjectException if the value cannot be converted. */ public abstract Object fromOpenValue(Object openValue) throws InvalidObjectException; /** * <p>Convert an instance of the Java type into the Open Type. * @param javaValue the value to be converted. * @return the converted value. * @throws OpenDataException if the value cannot be converted. */ public abstract Object toOpenValue(Object javaValue) throws OpenDataException; /** * <p>Throw an appropriate InvalidObjectException if we will not * be able to convert back from the open data to the original Java * object. The {@link #fromOpenValue fromOpenValue} throws an * exception if a given open data value cannot be converted. This * method throws an exception if <em>no</em> open data values can * be converted. The default implementation of this method never * throws an exception. Subclasses can override it as * appropriate.</p> * @throws InvalidObjectException if {@code fromOpenValue} will throw * an exception no matter what its argument is. */ public void checkReconstructible() throws InvalidObjectException {} }
⏎ com/sun/jmx/mbeanserver/MXBeanMapping.java
Or download all of them as a single archive file:
File name: java.management-11.0.1-src.zip File size: 828174 bytes Release date: 2018-11-04 Download
⇒ JDK 11 java.management.rmi.jmod - Management RMI Module
2020-04-30, 98917👍, 0💬
Popular Posts:
How to download and install JDK (Java Development Kit) 5? If you want to write Java applications, yo...
JDK 11 jdk.jlink.jmod is the JMOD file for JDK 11 JLink tool, which can be invoked by the "jlink" co...
JDK 11 jdk.compiler.jmod is the JMOD file for JDK 11 Compiler tool, which can be invoked by the "jav...
JavaMail Source Code Files are provided in the source package file, httpcomponents-client-5. 2-src.zi...
JDK 11 jdk.compiler.jmod is the JMOD file for JDK 11 Compiler tool, which can be invoked by the "jav...