This is an automated email from the ASF dual-hosted git repository.
veithen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ws-axiom.git
The following commit(s) were added to refs/heads/master by this push:
new f4ee48214 refactor: eliminate NodeFactory, rename NodeFactory2 to
NodeFactory
f4ee48214 is described below
commit f4ee482144ce0a51fd1eaa0d7b5be26f36326e84
Author: Copilot <[email protected]>
AuthorDate: Sun May 24 17:02:29 2026 +0100
refactor: eliminate NodeFactory, rename NodeFactory2 to NodeFactory
- Merge NodeFactory2's content (@Singleton + all create* methods) into
NodeFactory
- Delete NodeFactory2.java and NodeFactoryImpl.java
- Update AxiomNodeFactory, DOMNodeFactory: extends NodeFactory2 →
NodeFactory
- Update NodeFactoryMixin: implements NodeFactory2 → NodeFactory
- Update NodeType: Function<NodeFactory2,…> → Function<NodeFactory,…>,
remove getFactory2()
- Update AttributeMatcher, NSAwareAttributeMatcher,
NamespaceDeclarationMatcher params
- Update BuilderHandler/BuilderImpl: NodeFactory2 → NodeFactory
- Remove .getFactory2() from CoreElementMixin, CoreNodeMixin,
CoreParentNodeMixin,
CustomBuilderManager, AxiomSourcedElementMixin
- Update DOMSemantics param NodeFactory2 → NodeFactory
- Update AxiomSemantics: factory.getFactory2() → (AxiomNodeFactory) factory
- Simplify LLOMNodeFactory/DOOMNodeFactory to load weaver singleton as
NodeFactory
Co-authored-by: Andreas Veithen-Knowles <[email protected]>
---
.../axiom/om/impl/dom/factory/DOOMNodeFactory.java | 21 +++++--
.../om/impl/llom/factory/LLOMNodeFactory.java | 21 +++++--
.../org/apache/axiom/core/AttributeMatcher.java | 2 +-
.../apache/axiom/core/NSAwareAttributeMatcher.java | 2 +-
.../axiom/core/NamespaceDeclarationMatcher.java | 2 +-
.../java/org/apache/axiom/core/NodeFactory.java | 51 ++++++++++++++-
.../java/org/apache/axiom/core/NodeFactory2.java | 73 ----------------------
.../org/apache/axiom/core/NodeFactoryImpl.java | 37 -----------
.../main/java/org/apache/axiom/core/NodeType.java | 32 +++++-----
.../axiom/core/impl/builder/BuilderHandler.java | 6 +-
.../axiom/core/impl/builder/BuilderImpl.java | 4 +-
.../axiom/core/impl/mixin/CoreElementMixin.java | 3 +-
.../axiom/core/impl/mixin/CoreNodeMixin.java | 2 +-
.../axiom/core/impl/mixin/CoreParentNodeMixin.java | 2 +-
.../java/org/apache/axiom/dom/DOMNodeFactory.java | 4 +-
.../java/org/apache/axiom/dom/DOMSemantics.java | 4 +-
.../axiom/om/impl/common/AxiomSemantics.java | 2 +-
.../impl/common/builder/CustomBuilderManager.java | 4 +-
.../om/impl/intf/factory/AxiomNodeFactory.java | 4 +-
.../om/impl/mixin/AxiomSourcedElementMixin.java | 4 +-
.../axiom/om/impl/mixin/NodeFactoryMixin.java | 4 +-
21 files changed, 122 insertions(+), 162 deletions(-)
diff --git
a/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMNodeFactory.java
b/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMNodeFactory.java
index 3a4f1b3b7..8825f873e 100644
---
a/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMNodeFactory.java
+++
b/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMNodeFactory.java
@@ -18,12 +18,23 @@
*/
package org.apache.axiom.om.impl.dom.factory;
-import org.apache.axiom.core.NodeFactoryImpl;
+import org.apache.axiom.core.NodeFactory;
+import org.apache.axiom.core.NodeFactoryException;
-public final class DOOMNodeFactory extends NodeFactoryImpl {
- public static final DOOMNodeFactory INSTANCE = new DOOMNodeFactory();
+public final class DOOMNodeFactory {
+ public static final NodeFactory INSTANCE;
- private DOOMNodeFactory() {
- super(DOOMNodeFactory.class.getClassLoader(),
"org.apache.axiom.om.impl.dom.factory.DOOMNodeFactoryImpl");
+ static {
+ try {
+ INSTANCE = (NodeFactory) DOOMNodeFactory.class
+ .getClassLoader()
+
.loadClass("org.apache.axiom.om.impl.dom.factory.DOOMNodeFactoryImpl")
+ .getDeclaredField("INSTANCE")
+ .get(null);
+ } catch (ReflectiveOperationException ex) {
+ throw new NodeFactoryException("Failed to load NodeFactory
implementation", ex);
+ }
}
+
+ private DOOMNodeFactory() {}
}
diff --git
a/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/LLOMNodeFactory.java
b/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/LLOMNodeFactory.java
index 921c84613..992d93a78 100644
---
a/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/LLOMNodeFactory.java
+++
b/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/LLOMNodeFactory.java
@@ -18,12 +18,23 @@
*/
package org.apache.axiom.om.impl.llom.factory;
-import org.apache.axiom.core.NodeFactoryImpl;
+import org.apache.axiom.core.NodeFactory;
+import org.apache.axiom.core.NodeFactoryException;
-public final class LLOMNodeFactory extends NodeFactoryImpl {
- public static LLOMNodeFactory INSTANCE = new LLOMNodeFactory();
+public final class LLOMNodeFactory {
+ public static final NodeFactory INSTANCE;
- private LLOMNodeFactory() {
- super(LLOMNodeFactory.class.getClassLoader(),
"org.apache.axiom.om.impl.llom.factory.AxiomNodeFactoryImpl");
+ static {
+ try {
+ INSTANCE = (NodeFactory) LLOMNodeFactory.class
+ .getClassLoader()
+
.loadClass("org.apache.axiom.om.impl.llom.factory.AxiomNodeFactoryImpl")
+ .getDeclaredField("INSTANCE")
+ .get(null);
+ } catch (ReflectiveOperationException ex) {
+ throw new NodeFactoryException("Failed to load NodeFactory
implementation", ex);
+ }
}
+
+ private LLOMNodeFactory() {}
}
diff --git
a/mixins/core-mixins/src/main/java/org/apache/axiom/core/AttributeMatcher.java
b/mixins/core-mixins/src/main/java/org/apache/axiom/core/AttributeMatcher.java
index 17a602102..48703aa8c 100644
---
a/mixins/core-mixins/src/main/java/org/apache/axiom/core/AttributeMatcher.java
+++
b/mixins/core-mixins/src/main/java/org/apache/axiom/core/AttributeMatcher.java
@@ -74,7 +74,7 @@ public interface AttributeMatcher {
* @throws CoreModelException
*/
CoreAttribute createAttribute(
- NodeFactory2 nodeFactory, String namespaceURI, String name, String
prefix, String value)
+ NodeFactory nodeFactory, String namespaceURI, String name, String
prefix, String value)
throws CoreModelException;
/**
diff --git
a/mixins/core-mixins/src/main/java/org/apache/axiom/core/NSAwareAttributeMatcher.java
b/mixins/core-mixins/src/main/java/org/apache/axiom/core/NSAwareAttributeMatcher.java
index bf8ebc1c9..b141a255f 100644
---
a/mixins/core-mixins/src/main/java/org/apache/axiom/core/NSAwareAttributeMatcher.java
+++
b/mixins/core-mixins/src/main/java/org/apache/axiom/core/NSAwareAttributeMatcher.java
@@ -89,7 +89,7 @@ public final class NSAwareAttributeMatcher implements
AttributeMatcher {
@Override
public CoreAttribute createAttribute(
- NodeFactory2 nodeFactory, String namespaceURI, String name, String
prefix, String value)
+ NodeFactory nodeFactory, String namespaceURI, String name, String
prefix, String value)
throws CoreModelException {
CoreNSAwareAttribute attr = nodeFactory.createNSAwareAttribute();
attr.coreSetName(namespaceURI, name, prefix);
diff --git
a/mixins/core-mixins/src/main/java/org/apache/axiom/core/NamespaceDeclarationMatcher.java
b/mixins/core-mixins/src/main/java/org/apache/axiom/core/NamespaceDeclarationMatcher.java
index aee6ecc0d..92438e7b5 100644
---
a/mixins/core-mixins/src/main/java/org/apache/axiom/core/NamespaceDeclarationMatcher.java
+++
b/mixins/core-mixins/src/main/java/org/apache/axiom/core/NamespaceDeclarationMatcher.java
@@ -53,7 +53,7 @@ public final class NamespaceDeclarationMatcher implements
AttributeMatcher {
@Override
public CoreAttribute createAttribute(
- NodeFactory2 nodeFactory, String namespaceURI, String name, String
prefix, String value) {
+ NodeFactory nodeFactory, String namespaceURI, String name, String
prefix, String value) {
CoreNamespaceDeclaration decl =
nodeFactory.createNamespaceDeclaration();
decl.coreSetDeclaredNamespace(name, value);
return decl;
diff --git
a/mixins/core-mixins/src/main/java/org/apache/axiom/core/NodeFactory.java
b/mixins/core-mixins/src/main/java/org/apache/axiom/core/NodeFactory.java
index 3b5784a2f..a4679adfa 100644
--- a/mixins/core-mixins/src/main/java/org/apache/axiom/core/NodeFactory.java
+++ b/mixins/core-mixins/src/main/java/org/apache/axiom/core/NodeFactory.java
@@ -18,6 +18,55 @@
*/
package org.apache.axiom.core;
+import org.apache.axiom.weaver.annotation.FactoryMethod;
+import org.apache.axiom.weaver.annotation.Singleton;
+
+@Singleton
public interface NodeFactory {
- NodeFactory2 getFactory2();
+ @FactoryMethod
+ CoreDocument createDocument();
+
+ @FactoryMethod
+ CoreDocumentTypeDeclaration createDocumentTypeDeclaration();
+
+ @FactoryMethod
+ CoreNSAwareElement createNSAwareElement();
+
+ @FactoryMethod
+ CoreNSUnawareElement createNSUnawareElement();
+
+ @FactoryMethod
+ CoreNSAwareAttribute createNSAwareAttribute();
+
+ @FactoryMethod
+ CoreNSUnawareAttribute createNSUnawareAttribute();
+
+ @FactoryMethod
+ CoreNamespaceDeclaration createNamespaceDeclaration();
+
+ @FactoryMethod
+ CoreCharacterDataNode createCharacterDataNode();
+
+ @FactoryMethod
+ CoreProcessingInstruction createProcessingInstruction();
+
+ @FactoryMethod
+ CoreComment createComment();
+
+ @FactoryMethod
+ CoreCDATASection createCDATASection();
+
+ @FactoryMethod
+ CoreEntityReference createEntityReference();
+
+ @FactoryMethod
+ CoreDocumentFragment createDocumentFragment();
+
+ /**
+ * Create the namespace helper object that will be passed to {@link
+ * CoreNSAwareNamedNode#initName(String, String, String, Object)}.
+ *
+ * @return the namespace helper
+ */
+ Object createNamespaceHelper();
}
diff --git
a/mixins/core-mixins/src/main/java/org/apache/axiom/core/NodeFactory2.java
b/mixins/core-mixins/src/main/java/org/apache/axiom/core/NodeFactory2.java
deleted file mode 100644
index b7410253e..000000000
--- a/mixins/core-mixins/src/main/java/org/apache/axiom/core/NodeFactory2.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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
- *
- * http://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.axiom.core;
-
-import org.apache.axiom.weaver.annotation.FactoryMethod;
-import org.apache.axiom.weaver.annotation.Singleton;
-
-// TODO: this should be fused into NodeFactory
-@Singleton
-public interface NodeFactory2 {
- @FactoryMethod
- CoreDocument createDocument();
-
- @FactoryMethod
- CoreDocumentTypeDeclaration createDocumentTypeDeclaration();
-
- @FactoryMethod
- CoreNSAwareElement createNSAwareElement();
-
- @FactoryMethod
- CoreNSUnawareElement createNSUnawareElement();
-
- @FactoryMethod
- CoreNSAwareAttribute createNSAwareAttribute();
-
- @FactoryMethod
- CoreNSUnawareAttribute createNSUnawareAttribute();
-
- @FactoryMethod
- CoreNamespaceDeclaration createNamespaceDeclaration();
-
- @FactoryMethod
- CoreCharacterDataNode createCharacterDataNode();
-
- @FactoryMethod
- CoreProcessingInstruction createProcessingInstruction();
-
- @FactoryMethod
- CoreComment createComment();
-
- @FactoryMethod
- CoreCDATASection createCDATASection();
-
- @FactoryMethod
- CoreEntityReference createEntityReference();
-
- @FactoryMethod
- CoreDocumentFragment createDocumentFragment();
-
- /**
- * Create the namespace helper object that will be passed to {@link
- * CoreNSAwareNamedNode#initName(String, String, String, Object)}.
- *
- * @return the namespace helper
- */
- Object createNamespaceHelper();
-}
diff --git
a/mixins/core-mixins/src/main/java/org/apache/axiom/core/NodeFactoryImpl.java
b/mixins/core-mixins/src/main/java/org/apache/axiom/core/NodeFactoryImpl.java
deleted file mode 100644
index 4e800639b..000000000
---
a/mixins/core-mixins/src/main/java/org/apache/axiom/core/NodeFactoryImpl.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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
- *
- * http://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.axiom.core;
-
-public abstract class NodeFactoryImpl implements NodeFactory {
- private final NodeFactory2 factory2;
-
- public NodeFactoryImpl(ClassLoader cl, String factory2ClassName) {
- try {
- factory2 = (NodeFactory2)
-
cl.loadClass(factory2ClassName).getDeclaredField("INSTANCE").get(null);
- } catch (ReflectiveOperationException ex) {
- throw new NodeFactoryException("Failed to instantiate NodeFactory2
implementation", ex);
- }
- }
-
- @Override
- public NodeFactory2 getFactory2() {
- return factory2;
- }
-}
diff --git
a/mixins/core-mixins/src/main/java/org/apache/axiom/core/NodeType.java
b/mixins/core-mixins/src/main/java/org/apache/axiom/core/NodeType.java
index 425e60c94..71e10994e 100644
--- a/mixins/core-mixins/src/main/java/org/apache/axiom/core/NodeType.java
+++ b/mixins/core-mixins/src/main/java/org/apache/axiom/core/NodeType.java
@@ -23,43 +23,43 @@ import java.util.function.Function;
public enum NodeType {
/** The node is a {@link CoreDocument}. */
- DOCUMENT(NodeFactory2::createDocument),
+ DOCUMENT(NodeFactory::createDocument),
/** The node is a {@link CoreDocumentTypeDeclaration}. */
- DOCUMENT_TYPE_DECLARATION(NodeFactory2::createDocumentTypeDeclaration),
+ DOCUMENT_TYPE_DECLARATION(NodeFactory::createDocumentTypeDeclaration),
/** The node is a {@link CoreNSUnawareElement}. */
- NS_UNAWARE_ELEMENT(NodeFactory2::createNSUnawareElement),
+ NS_UNAWARE_ELEMENT(NodeFactory::createNSUnawareElement),
/** The node is a {@link CoreNSAwareElement}. */
- NS_AWARE_ELEMENT(NodeFactory2::createNSAwareElement),
+ NS_AWARE_ELEMENT(NodeFactory::createNSAwareElement),
/** The node is a {@link CoreNSUnawareAttribute}. */
- NS_UNAWARE_ATTRIBUTE(NodeFactory2::createNSUnawareAttribute),
+ NS_UNAWARE_ATTRIBUTE(NodeFactory::createNSUnawareAttribute),
/** The node is a {@link CoreNSAwareAttribute}. */
- NS_AWARE_ATTRIBUTE(NodeFactory2::createNSAwareAttribute),
+ NS_AWARE_ATTRIBUTE(NodeFactory::createNSAwareAttribute),
/** The node is a {@link CoreNamespaceDeclaration}. */
- NAMESPACE_DECLARATION(NodeFactory2::createNamespaceDeclaration),
+ NAMESPACE_DECLARATION(NodeFactory::createNamespaceDeclaration),
/** The node is a {@link CoreProcessingInstruction}. */
- PROCESSING_INSTRUCTION(NodeFactory2::createProcessingInstruction),
+ PROCESSING_INSTRUCTION(NodeFactory::createProcessingInstruction),
/** The node is a {@link CoreDocumentFragment}. */
- DOCUMENT_FRAGMENT(NodeFactory2::createDocumentFragment),
+ DOCUMENT_FRAGMENT(NodeFactory::createDocumentFragment),
/** The node is a {@link CoreCharacterDataNode}. */
- CHARACTER_DATA(NodeFactory2::createCharacterDataNode),
+ CHARACTER_DATA(NodeFactory::createCharacterDataNode),
/** The node is a {@link CoreComment}. */
- COMMENT(NodeFactory2::createComment),
+ COMMENT(NodeFactory::createComment),
/** The node is a {@link CoreCDATASection}. */
- CDATA_SECTION(NodeFactory2::createCDATASection),
+ CDATA_SECTION(NodeFactory::createCDATASection),
/** The node is a {@link CoreEntityReference}. */
- ENTITY_REFERENCE(NodeFactory2::createEntityReference);
+ ENTITY_REFERENCE(NodeFactory::createEntityReference);
static {
// TODO: add missing node types here (once we have tests that exercise
the code)
@@ -88,15 +88,15 @@ public enum NodeType {
NS_UNAWARE_ELEMENT.allowedChildTypes = s;
}
- private final Function<NodeFactory2, CoreNode> factory2Function;
+ private final Function<NodeFactory, CoreNode> factory2Function;
private EnumSet<NodeType> allowedChildTypes;
- private NodeType(Function<NodeFactory2, CoreNode> factory2Function) {
+ private NodeType(Function<NodeFactory, CoreNode> factory2Function) {
this.factory2Function = factory2Function;
}
public CoreNode newInstance(NodeFactory factory) {
- return factory2Function.apply(factory.getFactory2());
+ return factory2Function.apply(factory);
}
public boolean isChildTypeAllowed(NodeType childType) {
diff --git
a/mixins/core-mixins/src/main/java/org/apache/axiom/core/impl/builder/BuilderHandler.java
b/mixins/core-mixins/src/main/java/org/apache/axiom/core/impl/builder/BuilderHandler.java
index e7e6747b8..2353b61e8 100644
---
a/mixins/core-mixins/src/main/java/org/apache/axiom/core/impl/builder/BuilderHandler.java
+++
b/mixins/core-mixins/src/main/java/org/apache/axiom/core/impl/builder/BuilderHandler.java
@@ -26,12 +26,12 @@ import org.apache.axiom.core.CoreDocument;
import org.apache.axiom.core.CoreNSAwareElement;
import org.apache.axiom.core.CoreNode;
import org.apache.axiom.core.DeferredParsingException;
-import org.apache.axiom.core.NodeFactory2;
+import org.apache.axiom.core.NodeFactory;
import org.apache.axiom.core.stream.StreamException;
import org.apache.axiom.core.stream.XmlHandler;
final class BuilderHandler implements XmlHandler {
- final NodeFactory2 nodeFactory;
+ final NodeFactory nodeFactory;
final Model model;
final Builder builder;
final Object namespaceHelper;
@@ -52,7 +52,7 @@ final class BuilderHandler implements XmlHandler {
private ArrayList<BuilderListener> listeners;
private Queue<DeferredAction> deferredActions;
- BuilderHandler(NodeFactory2 nodeFactory, Model model, CoreNSAwareElement
root, Builder builder) {
+ BuilderHandler(NodeFactory nodeFactory, Model model, CoreNSAwareElement
root, Builder builder) {
this.nodeFactory = nodeFactory;
this.model = model;
this.builder = builder;
diff --git
a/mixins/core-mixins/src/main/java/org/apache/axiom/core/impl/builder/BuilderImpl.java
b/mixins/core-mixins/src/main/java/org/apache/axiom/core/impl/builder/BuilderImpl.java
index 25b4a77bc..1af5b12c1 100644
---
a/mixins/core-mixins/src/main/java/org/apache/axiom/core/impl/builder/BuilderImpl.java
+++
b/mixins/core-mixins/src/main/java/org/apache/axiom/core/impl/builder/BuilderImpl.java
@@ -22,7 +22,7 @@ import org.apache.axiom.core.Builder;
import org.apache.axiom.core.CoreDocument;
import org.apache.axiom.core.CoreNSAwareElement;
import org.apache.axiom.core.DeferredParsingException;
-import org.apache.axiom.core.NodeFactory2;
+import org.apache.axiom.core.NodeFactory;
import org.apache.axiom.core.stream.StreamException;
import org.apache.axiom.core.stream.XmlInput;
import org.apache.axiom.core.stream.XmlReader;
@@ -32,7 +32,7 @@ public final class BuilderImpl implements Builder {
private final BuilderHandler builderHandler;
private Object facade;
- public BuilderImpl(XmlInput input, NodeFactory2 nodeFactory, Model model,
CoreNSAwareElement root) {
+ public BuilderImpl(XmlInput input, NodeFactory nodeFactory, Model model,
CoreNSAwareElement root) {
builderHandler = new BuilderHandler(nodeFactory, model, root, this);
reader = input.createReader(builderHandler);
}
diff --git
a/mixins/core-mixins/src/main/java/org/apache/axiom/core/impl/mixin/CoreElementMixin.java
b/mixins/core-mixins/src/main/java/org/apache/axiom/core/impl/mixin/CoreElementMixin.java
index a7900dacf..063db067c 100644
---
a/mixins/core-mixins/src/main/java/org/apache/axiom/core/impl/mixin/CoreElementMixin.java
+++
b/mixins/core-mixins/src/main/java/org/apache/axiom/core/impl/mixin/CoreElementMixin.java
@@ -89,8 +89,7 @@ public abstract class CoreElementMixin implements CoreElement
{
attr = attr.coreGetNextAttribute();
}
if (attr == null) {
- CoreAttribute newAttr =
-
matcher.createAttribute(coreGetNodeFactory().getFactory2(), namespaceURI, name,
prefix, value);
+ CoreAttribute newAttr =
matcher.createAttribute(coreGetNodeFactory(), namespaceURI, name, prefix,
value);
if (previousAttr == null) {
coreAppendAttribute(newAttr);
} else {
diff --git
a/mixins/core-mixins/src/main/java/org/apache/axiom/core/impl/mixin/CoreNodeMixin.java
b/mixins/core-mixins/src/main/java/org/apache/axiom/core/impl/mixin/CoreNodeMixin.java
index 0fb0adf4d..6371d245b 100644
---
a/mixins/core-mixins/src/main/java/org/apache/axiom/core/impl/mixin/CoreNodeMixin.java
+++
b/mixins/core-mixins/src/main/java/org/apache/axiom/core/impl/mixin/CoreNodeMixin.java
@@ -36,7 +36,7 @@ public abstract class CoreNodeMixin implements CoreNode {
if (root instanceof CoreDocument document) {
return document;
} else if (create) {
- CoreDocument ownerDocument =
root.coreGetNodeFactory().getFactory2().createDocument();
+ CoreDocument ownerDocument =
root.coreGetNodeFactory().createDocument();
root.coreSetOwnerDocument(ownerDocument);
return ownerDocument;
} else {
diff --git
a/mixins/core-mixins/src/main/java/org/apache/axiom/core/impl/mixin/CoreParentNodeMixin.java
b/mixins/core-mixins/src/main/java/org/apache/axiom/core/impl/mixin/CoreParentNodeMixin.java
index 47a41fc31..91aed47e5 100644
---
a/mixins/core-mixins/src/main/java/org/apache/axiom/core/impl/mixin/CoreParentNodeMixin.java
+++
b/mixins/core-mixins/src/main/java/org/apache/axiom/core/impl/mixin/CoreParentNodeMixin.java
@@ -121,7 +121,7 @@ public abstract class CoreParentNodeMixin implements
CoreParentNode {
public final Content internalGetContent(boolean create) {
if (getState() == COMPACT) {
Content content = new Content();
- CoreCharacterDataNode cdata =
coreGetNodeFactory().getFactory2().createCharacterDataNode();
+ CoreCharacterDataNode cdata =
coreGetNodeFactory().createCharacterDataNode();
cdata.internalSetParent(this);
cdata.coreSetCharacterData(this.content);
content.firstChild = cdata;
diff --git
a/mixins/dom-mixins/src/main/java/org/apache/axiom/dom/DOMNodeFactory.java
b/mixins/dom-mixins/src/main/java/org/apache/axiom/dom/DOMNodeFactory.java
index 43151ae31..355a85708 100644
--- a/mixins/dom-mixins/src/main/java/org/apache/axiom/dom/DOMNodeFactory.java
+++ b/mixins/dom-mixins/src/main/java/org/apache/axiom/dom/DOMNodeFactory.java
@@ -18,13 +18,13 @@
*/
package org.apache.axiom.dom;
-import org.apache.axiom.core.NodeFactory2;
+import org.apache.axiom.core.NodeFactory;
import org.apache.axiom.weaver.annotation.FactoryMethod;
import org.apache.axiom.weaver.annotation.Singleton;
import org.w3c.dom.DOMImplementation;
@Singleton
-public interface DOMNodeFactory extends NodeFactory2, DOMImplementation {
+public interface DOMNodeFactory extends NodeFactory, DOMImplementation {
@FactoryMethod
@Override
DOMDocument createDocument();
diff --git
a/mixins/dom-mixins/src/main/java/org/apache/axiom/dom/DOMSemantics.java
b/mixins/dom-mixins/src/main/java/org/apache/axiom/dom/DOMSemantics.java
index e17d824d2..c52f9b10f 100644
--- a/mixins/dom-mixins/src/main/java/org/apache/axiom/dom/DOMSemantics.java
+++ b/mixins/dom-mixins/src/main/java/org/apache/axiom/dom/DOMSemantics.java
@@ -28,7 +28,7 @@ import org.apache.axiom.core.CoreNSUnawareAttribute;
import org.apache.axiom.core.DetachPolicy;
import org.apache.axiom.core.NSAwareAttributeMatcher;
import org.apache.axiom.core.NamespaceDeclarationMatcher;
-import org.apache.axiom.core.NodeFactory2;
+import org.apache.axiom.core.NodeFactory;
import org.apache.axiom.core.NodeType;
import org.apache.axiom.core.Semantics;
@@ -93,7 +93,7 @@ public final class DOMSemantics implements Semantics {
@Override
public CoreAttribute createAttribute(
- NodeFactory2 nodeFactory, String namespaceURI, String name,
String prefix, String value)
+ NodeFactory nodeFactory, String namespaceURI, String name,
String prefix, String value)
throws CoreModelException {
CoreNSUnawareAttribute attr =
nodeFactory.createNSUnawareAttribute();
attr.coreSetName(name);
diff --git
a/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/common/AxiomSemantics.java
b/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/common/AxiomSemantics.java
index 6cb7943d2..49e7cf7b5 100644
---
a/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/common/AxiomSemantics.java
+++
b/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/common/AxiomSemantics.java
@@ -72,7 +72,7 @@ public final class AxiomSemantics implements Semantics {
throw new NodeFactoryException("Failed to clone node", ex);
}
} else if (options != null && options.isCopyOMDataSources() &&
node instanceof AxiomSourcedElement) {
- return ((AxiomNodeFactory)
factory.getFactory2()).createSourcedElement();
+ return ((AxiomNodeFactory) factory).createSourcedElement();
} else {
return node.coreGetNodeType().newInstance(factory);
}
diff --git
a/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/common/builder/CustomBuilderManager.java
b/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/common/builder/CustomBuilderManager.java
index 558a05101..45e4c1491 100644
---
a/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/common/builder/CustomBuilderManager.java
+++
b/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/common/builder/CustomBuilderManager.java
@@ -109,8 +109,8 @@ final class CustomBuilderManager implements BuilderListener
{
} else {
type = AxiomNodeFactory::createSourcedElement;
}
- AxiomSourcedElement newElement =
type.create((AxiomNodeFactory)
-
element.coreGetNodeFactory().getFactory2());
+ AxiomSourcedElement newElement =
+ type.create((AxiomNodeFactory)
element.coreGetNodeFactory());
if (log.isDebugEnabled()) {
log.debug("Replacing element with new sourced
element of type "
+ newElement.getClass().getName());
diff --git
a/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/intf/factory/AxiomNodeFactory.java
b/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/intf/factory/AxiomNodeFactory.java
index c319f7ffa..f77402a96 100644
---
a/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/intf/factory/AxiomNodeFactory.java
+++
b/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/intf/factory/AxiomNodeFactory.java
@@ -18,7 +18,7 @@
*/
package org.apache.axiom.om.impl.intf.factory;
-import org.apache.axiom.core.NodeFactory2;
+import org.apache.axiom.core.NodeFactory;
import org.apache.axiom.om.OMMetaFactorySPI;
import org.apache.axiom.om.impl.intf.AxiomAttribute;
import org.apache.axiom.om.impl.intf.AxiomCDATASection;
@@ -58,7 +58,7 @@ import org.apache.axiom.weaver.annotation.FactoryMethod;
import org.apache.axiom.weaver.annotation.Singleton;
@Singleton
-public interface AxiomNodeFactory extends NodeFactory2, OMMetaFactorySPI {
+public interface AxiomNodeFactory extends NodeFactory, OMMetaFactorySPI {
@FactoryMethod
@Override
AxiomDocument createDocument();
diff --git
a/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSourcedElementMixin.java
b/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSourcedElementMixin.java
index 93b21c65b..b5e5b6904 100644
---
a/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSourcedElementMixin.java
+++
b/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/mixin/AxiomSourcedElementMixin.java
@@ -213,7 +213,7 @@ public abstract class AxiomSourcedElementMixin implements
AxiomSourcedElement {
// XML with respect to namespaces.
builder = new BuilderImpl(
new PushOMDataSourceInput(this, dataSource),
- coreGetNodeFactory().getFactory2(),
+ coreGetNodeFactory(),
PlainXMLModel.INSTANCE,
this);
} else {
@@ -229,7 +229,7 @@ public abstract class AxiomSourcedElementMixin implements
AxiomSourcedElement {
new FilteredXmlInput(
new StAXPullInput(readerFromDS,
AxiomXMLStreamReaderHelperFactory.INSTANCE),
NamespaceRepairingFilter.DEFAULT),
- coreGetNodeFactory().getFactory2(),
+ coreGetNodeFactory(),
PlainXMLModel.INSTANCE,
this);
}
diff --git
a/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/mixin/NodeFactoryMixin.java
b/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/mixin/NodeFactoryMixin.java
index e8c7733bd..46e18ab9c 100644
---
a/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/mixin/NodeFactoryMixin.java
+++
b/mixins/om-mixins/src/main/java/org/apache/axiom/om/impl/mixin/NodeFactoryMixin.java
@@ -18,12 +18,12 @@
*/
package org.apache.axiom.om.impl.mixin;
-import org.apache.axiom.core.NodeFactory2;
+import org.apache.axiom.core.NodeFactory;
import org.apache.axiom.om.impl.common.builder.OMNamespaceCache;
import org.apache.axiom.weaver.annotation.Mixin;
@Mixin
-public abstract class NodeFactoryMixin implements NodeFactory2 {
+public abstract class NodeFactoryMixin implements NodeFactory {
@Override
public final OMNamespaceCache createNamespaceHelper() {
return new OMNamespaceCache();