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 11 java.xml.jmod - XML Module
JDK 11 java.xml.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) module.
JDK 11 XML module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\java.xml.jmod.
JDK 11 XML module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 XML module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\java.xml.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ org/xml/sax/helpers/NewInstance.java
/*
* Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
// NewInstance.java - create a new instance of a class by name.
// http://www.saxproject.org
// Written by Edwin Goei, edwingo@apache.org
// and by David Brownell, dbrownell@users.sourceforge.net
// NO WARRANTY! This class is in the Public Domain.
// $Id: NewInstance.java,v 1.2 2005/06/10 03:50:50 jeffsuttor Exp $
package org.xml.sax.helpers;
import java.lang.reflect.InvocationTargetException;
import java.util.Objects;
/**
* Create a new instance of a class by name.
*
* <blockquote>
* <em>This module, both source code and documentation, is in the
* Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
* See <a href='http://www.saxproject.org'>http://www.saxproject.org</a>
* for further information.
* </blockquote>
*
* <p>This class contains a static method for creating an instance of a
* class from an explicit class name. It tries to use the thread's context
* ClassLoader if possible and falls back to using
* Class.forName(String).</p>
*
* <p>This code is designed to compile and run on JDK version 1.1 and later
* including versions of Java 2.</p>
*
* @author Edwin Goei, David Brownell
* @version 2.0.1 (sax2r2)
*/
class NewInstance {
private static final String DEFAULT_PACKAGE = "com.sun.org.apache.xerces.internal";
private static final String DEFAULT_CLASS = "com.sun.org.apache.xerces.internal.parsers.SAXParser";
/**
* Creates a new instance of the specified class name
*
* Package private so this code is not exposed at the API level.
*/
static <T> T newInstance (Class<T> type, ClassLoader loader, String clsName)
throws ClassNotFoundException, IllegalAccessException,
InstantiationException
{
ClassLoader classLoader = Objects.requireNonNull(loader);
String className = Objects.requireNonNull(clsName);
// Instantiate directly for the SAX default parser
if (className.equals(DEFAULT_CLASS)) {
return type.cast(new com.sun.org.apache.xerces.internal.parsers.SAXParser());
}
// make sure we have access to restricted packages
boolean internal = false;
if (System.getSecurityManager() != null) {
if (className != null && className.startsWith(DEFAULT_PACKAGE)) {
internal = true;
}
}
Class<?> driverClass;
if (classLoader == null || internal) {
driverClass = Class.forName(className);
} else {
driverClass = classLoader.loadClass(className);
}
try {
return type.cast(driverClass.getConstructor().newInstance());
} catch (NoSuchMethodException | SecurityException | InvocationTargetException ex) {
throw new InstantiationException(ex.getMessage());
}
}
}
⏎ org/xml/sax/helpers/NewInstance.java
Or download all of them as a single archive file:
File name: java.xml-11.0.1-src.zip File size: 4876106 bytes Release date: 2018-11-04 Download
⇒ JDK 11 java.xml.crypto.jmod - XML Crypto Module
2020-08-25, ≈692🔥, 0💬
Popular Posts:
JSP(tm) Standard Tag Library 1.0 implementation - Jakarta Taglibs hosts the Standard Taglib 1.0, an ...
iText is an ideal library for developers looking to enhance web- and other applications with dynamic...
How to download and install mysql-connector-j-8.0.31 .zip?Connector/J Java library is a JDBC Driver ...
JDK 17 jdk.localedata.jmod is the JMOD file for JDK 17 Localedata module. JDK 17 Locale Data module ...
Jetty provides an HTTP server, HTTP client, and javax.servlet container. These components are open s...