Skip to content

Commit 7a94de9

Browse files
hansonrhansonr
authored andcommitted
addes org.apache.xerces
1 parent eaeb043 commit 7a94de9

File tree

643 files changed

+212074
-113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

643 files changed

+212074
-113
lines changed

sources/net.sf.j2s.java.core/src/java/lang/Class.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2879,7 +2879,9 @@ Method get(int i) {
28792879
void removeByNameAndSignature(Method toRemove) {
28802880
for (int i = 0; i < length; i++) {
28812881
Method m = methods[i];
2882-
if (m != null && m.getReturnType() == toRemove.getReturnType() && m.getName() == toRemove.getName()
2882+
if (m != null
2883+
//&& m.getReturnType() == toRemove.getReturnType()
2884+
&& m.getName() == toRemove.getName()
28832885
&& arrayContentsEq(m.getParameterTypes(), toRemove.getParameterTypes())) {
28842886
methods[i] = null;
28852887
}

sources/net.sf.j2s.java.core/src/javax/xml/parsers/SAXParserFactory.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
import javax.xml.validation.Schema;
1818

1919
import org.xml.sax.SAXException;
20+
import org.xml.sax.SAXNotRecognizedException;
21+
import org.xml.sax.SAXNotSupportedException;
2022

2123
/**
2224
*
@@ -177,8 +179,11 @@ public static Parser makeParser(String className)
177179
*
178180
* @param name
179181
* @return
182+
* @throws SAXNotSupportedException
183+
* @throws SAXNotRecognizedException
184+
* @throws ParserConfigurationException
180185
*/
181-
public boolean getFeature(String name) {
186+
public boolean getFeature(String name) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException {
182187
return props.getProperty(name, "false").equals("true");
183188
}
184189

@@ -221,7 +226,7 @@ public boolean isXIncludeAware() {
221226
return xIncludeAware;
222227
}
223228

224-
public void setFeature(String name, boolean value) {
229+
public void setFeature(String name, boolean value) throws ParserConfigurationException, SAXNotRecognizedException, SAXNotSupportedException {
225230
props.setProperty(name, "" + value);
226231
}
227232

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
package org.apache.xerces.dom;
19+
20+
import org.apache.xerces.dom3.as.ASModel;
21+
import org.apache.xerces.dom3.as.DOMASBuilder;
22+
import org.apache.xerces.dom3.as.DOMASWriter;
23+
import org.apache.xerces.dom3.as.DOMImplementationAS;
24+
import org.apache.xerces.parsers.DOMASBuilderImpl;
25+
import org.w3c.dom.DOMException;
26+
import org.w3c.dom.DOMImplementation;
27+
28+
29+
30+
/**
31+
* The DOMImplementation class is description of a particular
32+
* implementation of the Document Object Model. As such its data is
33+
* static, shared by all instances of this implementation.
34+
* <P>
35+
* The DOM API requires that it be a real object rather than static
36+
* methods. However, there's nothing that says it can't be a singleton,
37+
* so that's how I've implemented it.
38+
* <P>
39+
* This particular class, along with DocumentImpl, supports the DOM
40+
* Core, DOM Level 2 optional mofules, and Abstract Schemas (Experimental).
41+
* @deprecated
42+
* @version $Id: ASDOMImplementationImpl.java 699892 2008-09-28 21:08:27Z mrglavas $
43+
* @since PR-DOM-Level-1-19980818.
44+
*/
45+
public class ASDOMImplementationImpl extends DOMImplementationImpl
46+
implements DOMImplementationAS {
47+
48+
49+
// static
50+
51+
/** Dom implementation singleton. */
52+
static final ASDOMImplementationImpl singleton = new ASDOMImplementationImpl();
53+
54+
55+
//
56+
// Public methods
57+
//
58+
59+
/** NON-DOM: Obtain and return the single shared object */
60+
public static DOMImplementation getDOMImplementation() {
61+
return singleton;
62+
}
63+
64+
//
65+
// DOM L3 Abstract Schemas:
66+
// REVISIT: implement hasFeature()
67+
//
68+
69+
/**
70+
* DOM Level 3 WD - Experimental.
71+
* Creates an ASModel.
72+
* @param isNamespaceAware Allow creation of <code>ASModel</code> with
73+
* this attribute set to a specific value.
74+
* @return A <code>null</code> return indicates failure.what is a
75+
* failure? Could be a system error.
76+
*/
77+
public ASModel createAS(boolean isNamespaceAware){
78+
return new ASModelImpl(isNamespaceAware);
79+
}
80+
81+
/**
82+
* DOM Level 3 WD - Experimental.
83+
* Creates an <code>DOMASBuilder</code>.Do we need the method since we
84+
* already have <code>DOMImplementationLS.createDOMParser</code>?
85+
* @return DOMASBuilder
86+
*/
87+
public DOMASBuilder createDOMASBuilder(){
88+
return new DOMASBuilderImpl();
89+
}
90+
91+
92+
/**
93+
* DOM Level 3 WD - Experimental.
94+
* Creates an <code>DOMASWriter</code>.
95+
* @return a DOMASWriter
96+
*/
97+
public DOMASWriter createDOMASWriter(){
98+
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
99+
throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
100+
}
101+
102+
103+
104+
} // class DOMImplementationImpl

0 commit comments

Comments
 (0)