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:
Apache Ant Source Code Files
Apache Ant Source Code Files are inside the Apache Ant source package file like apache-ant-1.10.10-src.zip. Unzip the source package file and go to the "src/main" sub-directory, you will see source code files.
Here is the list of Java source code files of the Apache Ant 1.10.10 in \Users\fyicenter\apache-ant-1.10.10\src\main:
✍: FYIcenter.com
⏎ org/apache/tools/ant/types/resolver/ApacheCatalogResolver.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.tools.ant.types.resolver; import java.io.IOException; import java.net.URL; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.types.ResourceLocation; import org.apache.tools.ant.types.XMLCatalog; import org.apache.xml.resolver.Catalog; import org.apache.xml.resolver.CatalogManager; import org.apache.xml.resolver.tools.CatalogResolver; /** * <p>This class extends the CatalogResolver class provided by Norman * Walsh's resolver library in xml-commons. It provides the bridge * between the Ant XMLCatalog datatype and the xml-commons Catalog * class. XMLCatalog calls methods in this class using Reflection in * order to avoid requiring the xml-commons resolver library in the * path.</p> * * <p>The {@link org.apache.tools.ant.types.resolver.ApacheCatalog * ApacheCatalog} class is used to parse external catalog files, which * can be in either <a * href="https://oasis-open.org/committees/entity/background/9401.html"> * plain text format</a> or <a * href="https://www.oasis-open.org/committees/entity/spec-2001-08-06.html"> * XML format</a>.</p> * * <p>For each entry found in an external catalog file, if any, an * instance of {@link org.apache.tools.ant.types.ResourceLocation * ResourceLocation} is created and added to the controlling * XMLCatalog datatype. In this way, these entries will be included * in XMLCatalog's lookup algorithm. See XMLCatalog.java for more * details.</p> * * @see org.apache.tools.ant.types.XMLCatalog * @see org.apache.xml.resolver.CatalogManager * @since Ant 1.6 */ public class ApacheCatalogResolver extends CatalogResolver { /** The XMLCatalog object to callback. */ private XMLCatalog xmlCatalog = null; static { // // If you don't do this, you get all sorts of annoying // warnings about a missing properties file. However, it // seems to work just fine with default values. Ultimately, // we should probably include a "CatalogManager.properties" // file in the ant jarfile with some default property // settings. See CatalogManager.java for more details. // CatalogManager.getStaticManager().setIgnoreMissingProperties(true); // // Make sure CatalogResolver instantiates ApacheCatalog, // rather than a plain Catalog // System.getProperties().put("xml.catalog.className", ApacheCatalog.class.getName()); CatalogManager.getStaticManager().setUseStaticCatalog(false); // debug // CatalogManager.getStaticManager().setVerbosity(4); } /** * Set the XMLCatalog object to callback. * @param xmlCatalog the XMLCatalog to use. */ public void setXMLCatalog(final XMLCatalog xmlCatalog) { this.xmlCatalog = xmlCatalog; } /** * XMLCatalog calls this to add an external catalog file for each * file within a <code><catalogfiles></code> fileset. * @param file the external catalog file. */ public void parseCatalog(final String file) { final Catalog catalog = getCatalog(); if (!(catalog instanceof ApacheCatalog)) { throw new BuildException("Wrong catalog type found: %s", catalog.getClass().getName()); } final ApacheCatalog apacheCatalog = (ApacheCatalog) catalog; // Pass in reference to ourselves so we can be called back. apacheCatalog.setResolver(this); try { apacheCatalog.parseCatalog(file); } catch (IOException ex) { throw new BuildException(ex); } } /** * <p>Add a PUBLIC catalog entry to the controlling XMLCatalog instance. * ApacheCatalog calls this for each PUBLIC entry found in an external * catalog file.</p> * * @param publicid The public ID of the resource * @param systemid The system ID (aka location) of the resource * @param base The base URL of the resource. If the systemid * specifies a relative URL/pathname, it is resolved using the * base. The default base for an external catalog file is the * directory in which the catalog is located. * */ public void addPublicEntry(final String publicid, final String systemid, final URL base) { final ResourceLocation dtd = new ResourceLocation(); dtd.setBase(base); dtd.setPublicId(publicid); dtd.setLocation(systemid); xmlCatalog.addDTD(dtd); } /** * <p>Add a URI catalog entry to the controlling XMLCatalog instance. * ApacheCatalog calls this for each URI entry found in an external * catalog file.</p> * * @param uri The URI of the resource * @param altURI The URI to which the resource should be mapped * (aka the location) * @param base The base URL of the resource. If the altURI * specifies a relative URL/pathname, it is resolved using the * base. The default base for an external catalog file is the * directory in which the catalog is located. * */ public void addURIEntry(final String uri, final String altURI, final URL base) { final ResourceLocation entity = new ResourceLocation(); entity.setBase(base); entity.setPublicId(uri); entity.setLocation(altURI); xmlCatalog.addEntity(entity); } }
⏎ org/apache/tools/ant/types/resolver/ApacheCatalogResolver.java
Or download all of them as a single archive file:
File name: apache-ant-1.10.10-fyi.zip File size: 2392938 bytes Release date: 2021-04-17 Download
⇐ Download Apache Ant Source Package
2021-07-10, 110870👍, 0💬
Popular Posts:
What Is in Xerces-J-bin.2.12.2.zip? Xerces-J-bin.2.12.2.zip file is the distribution package ZIP fil...
Apache Axis2 is the core engine for Web services. It is a complete re-design and re-write of the wid...
The JMX technology provides the tools for building distributed, Web-based, modular and dynamic solut...
JDK 11 jdk.jfr.jmod is the JMOD file for JDK 11 JFR module. JDK 11 JFR module compiled class files a...
JDK 11 jdk.crypto.mscapi.jmod is the JMOD file for JDK 11 Crypto MSCAPI module. JDK 11 Crypto MSCAPI...