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:
JUnit 4.13.2 Source Code Files
JUnit Source Code Files are provided in the
source package file, junit-4.13.2-sources.jar.
You can browse JUnit Source Code files below:
✍: FYIcenter.com
⏎ org/junit/internal/management/ManagementFactory.java
package org.junit.internal.management;
import org.junit.internal.Classes;
import java.lang.reflect.InvocationTargetException;
/**
* Reflective wrapper around {@link java.lang.management.ManagementFactory}
*/
public class ManagementFactory {
private static final class FactoryHolder {
private static final Class<?> MANAGEMENT_FACTORY_CLASS;
static {
Class<?> managementFactoryClass = null;
try {
managementFactoryClass = Classes.getClass("java.lang.management.ManagementFactory");
} catch (ClassNotFoundException e) {
// do nothing, managementFactoryClass will be none on failure
}
MANAGEMENT_FACTORY_CLASS = managementFactoryClass;
}
static Object getBeanObject(String methodName) {
if (MANAGEMENT_FACTORY_CLASS != null) {
try {
return MANAGEMENT_FACTORY_CLASS.getMethod(methodName).invoke(null);
} catch (IllegalAccessException e) {
// fallthrough
} catch (IllegalArgumentException e) {
// fallthrough
} catch (InvocationTargetException e) {
// fallthrough
} catch (NoSuchMethodException e) {
// fallthrough
} catch (SecurityException e) {
// fallthrough
}
}
return null;
}
}
private static final class RuntimeHolder {
private static final RuntimeMXBean RUNTIME_MX_BEAN =
getBean(FactoryHolder.getBeanObject("getRuntimeMXBean"));
private static final RuntimeMXBean getBean(Object runtimeMxBean) {
return runtimeMxBean != null
? new ReflectiveRuntimeMXBean(runtimeMxBean) : new FakeRuntimeMXBean();
}
}
private static final class ThreadHolder {
private static final ThreadMXBean THREAD_MX_BEAN =
getBean(FactoryHolder.getBeanObject("getThreadMXBean"));
private static final ThreadMXBean getBean(Object threadMxBean) {
return threadMxBean != null
? new ReflectiveThreadMXBean(threadMxBean) : new FakeThreadMXBean();
}
}
/**
* @see java.lang.management.ManagementFactory#getRuntimeMXBean()
*/
public static RuntimeMXBean getRuntimeMXBean() {
return RuntimeHolder.RUNTIME_MX_BEAN;
}
/**
* @see java.lang.management.ManagementFactory#getThreadMXBean()
*/
public static ThreadMXBean getThreadMXBean() {
return ThreadHolder.THREAD_MX_BEAN;
}
}
⏎ org/junit/internal/management/ManagementFactory.java
Or download all of them as a single archive file:
File name: junit-4.13.2-sources.jar File size: 234540 bytes Release date: 2021-02-13 Download
⇒ Download and Install junit-4.12.jar
⇐ Download and Install junit-4.13.2.jar
2016-03-28, ≈58🔥, 0💬
Popular Posts:
What Is jtds-1.2.2.jar? jtds-1.2.2.jar is the JAR files of jTDS Java library 1.2.2, which is a JDBC ...
JDK 11 jdk.xml.dom.jmod is the JMOD file for JDK 11 XML DOM module. JDK 11 XML DOM module compiled c...
JDK 11 jdk.jconsole.jmod is the JMOD file for JDK 11 JConsole tool, which can be invoked by the "jco...
JDK 11 jdk.xml.dom.jmod is the JMOD file for JDK 11 XML DOM module. JDK 11 XML DOM module compiled c...
Apache ZooKeeper is an open-source server which enables highly reliable distributed coordination. Ap...