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 58e946809 Auto-generate coreGetNodeFactory() via weaver @Inject 
annotation
58e946809 is described below

commit 58e94680930dc55d002b466c37a0e145099adbbf
Author: Copilot <[email protected]>
AuthorDate: Sun May 24 18:43:16 2026 +0100

    Auto-generate coreGetNodeFactory() via weaver @Inject annotation
    
    Co-authored-by: Andreas Veithen-Knowles <[email protected]>
---
 implementations/axiom-dom/pom.xml                  |  5 ---
 .../axiom/om/impl/dom/factory/DOOMNodeFactory.java | 40 ----------------------
 .../axiom/om/impl/dom/mixin/DOOMNodeMixin.java     | 32 -----------------
 .../axiom/om/impl/dom/mixin/package-info.java      |  1 -
 implementations/axiom-impl/pom.xml                 |  6 ----
 .../om/impl/llom/factory/LLOMNodeFactory.java      | 40 ----------------------
 .../impl/llom/mixin/AxiomInformationItemMixin.java | 32 -----------------
 .../axiom/om/impl/llom/mixin/package-info.java     | 23 -------------
 .../main/java/org/apache/axiom/core/CoreNode.java  |  2 ++
 9 files changed, 2 insertions(+), 179 deletions(-)

diff --git a/implementations/axiom-dom/pom.xml 
b/implementations/axiom-dom/pom.xml
index 90130be29..6e6a5f2cd 100644
--- a/implementations/axiom-dom/pom.xml
+++ b/implementations/axiom-dom/pom.xml
@@ -248,12 +248,7 @@
                 <groupId>de.obqo.decycle</groupId>
                 <artifactId>decycle-maven-plugin</artifactId>
                 <configuration>
-                    <!-- TODO: inject the reference to the singleton into 
mixins directly -->
                     <ignoring>
-                        <ignoredDependency>
-                            
<from>org.apache.axiom.om.impl.dom.CoreNodeImpl</from>
-                            
<to>org.apache.axiom.om.impl.dom.factory.DOOMNodeFactory</to>
-                        </ignoredDependency>
                         <ignoredDependency>
                             
<from>org.apache.axiom.om.impl.dom.CoreNodeImpl</from>
                             
<to>org.apache.axiom.om.impl.dom.factory.DOOMNodeFactoryImpl</to>
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
deleted file mode 100644
index 8825f873e..000000000
--- 
a/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/factory/DOOMNodeFactory.java
+++ /dev/null
@@ -1,40 +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.om.impl.dom.factory;
-
-import org.apache.axiom.core.NodeFactory;
-import org.apache.axiom.core.NodeFactoryException;
-
-public final class DOOMNodeFactory {
-    public static final NodeFactory INSTANCE;
-
-    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-dom/src/main/java/org/apache/axiom/om/impl/dom/mixin/DOOMNodeMixin.java
 
b/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/mixin/DOOMNodeMixin.java
deleted file mode 100644
index d47e68022..000000000
--- 
a/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/mixin/DOOMNodeMixin.java
+++ /dev/null
@@ -1,32 +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.om.impl.dom.mixin;
-
-import org.apache.axiom.core.NodeFactory;
-import org.apache.axiom.om.impl.dom.factory.DOOMNodeFactory;
-import org.apache.axiom.om.impl.dom.intf.DOOMNode;
-import org.apache.axiom.weaver.annotation.Mixin;
-
-@Mixin
-public abstract class DOOMNodeMixin implements DOOMNode {
-    @Override
-    public final NodeFactory coreGetNodeFactory() {
-        return DOOMNodeFactory.INSTANCE;
-    }
-}
diff --git 
a/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/mixin/package-info.java
 
b/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/mixin/package-info.java
index 968be3a70..00cad5afd 100644
--- 
a/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/mixin/package-info.java
+++ 
b/implementations/axiom-dom/src/main/java/org/apache/axiom/om/impl/dom/mixin/package-info.java
@@ -19,6 +19,5 @@
 @org.apache.axiom.weaver.annotation.WeavablePackage(
         mixins = {
             DOOMNodeFactoryMixin.class,
-            DOOMNodeMixin.class,
         })
 package org.apache.axiom.om.impl.dom.mixin;
diff --git a/implementations/axiom-impl/pom.xml 
b/implementations/axiom-impl/pom.xml
index c688124cd..4c8b7f0b4 100644
--- a/implementations/axiom-impl/pom.xml
+++ b/implementations/axiom-impl/pom.xml
@@ -107,7 +107,6 @@
                                 
<weavablePackage>org.apache.axiom.core.impl.mixin</weavablePackage>
                                 
<weavablePackage>org.apache.axiom.om.impl.mixin</weavablePackage>
                                 
<weavablePackage>org.apache.axiom.soap.impl.mixin</weavablePackage>
-                                
<weavablePackage>org.apache.axiom.om.impl.llom.mixin</weavablePackage>
                             </weavablePackages>
                             <interfaces>
                                 
<interface>org.apache.axiom.om.impl.intf.AxiomAttribute</interface>
@@ -208,16 +207,11 @@
                 <groupId>de.obqo.decycle</groupId>
                 <artifactId>decycle-maven-plugin</artifactId>
                 <configuration>
-                    <!-- TODO: inject the reference to the singleton into 
mixins directly -->
                     <ignoring>
                         <ignoredDependency>
                             
<from>org.apache.axiom.om.impl.llom.CoreNodeImpl</from>
                             
<to>org.apache.axiom.om.impl.llom.factory.AxiomNodeFactoryImpl</to>
                         </ignoredDependency>
-                        <ignoredDependency>
-                            
<from>org.apache.axiom.om.impl.llom.CoreNodeImpl</from>
-                            
<to>org.apache.axiom.om.impl.llom.factory.LLOMNodeFactory</to>
-                        </ignoredDependency>
                     </ignoring>
                 </configuration>
             </plugin>
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
deleted file mode 100644
index 992d93a78..000000000
--- 
a/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/factory/LLOMNodeFactory.java
+++ /dev/null
@@ -1,40 +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.om.impl.llom.factory;
-
-import org.apache.axiom.core.NodeFactory;
-import org.apache.axiom.core.NodeFactoryException;
-
-public final class LLOMNodeFactory {
-    public static final NodeFactory INSTANCE;
-
-    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/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/mixin/AxiomInformationItemMixin.java
 
b/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/mixin/AxiomInformationItemMixin.java
deleted file mode 100644
index c712ea3c8..000000000
--- 
a/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/mixin/AxiomInformationItemMixin.java
+++ /dev/null
@@ -1,32 +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.om.impl.llom.mixin;
-
-import org.apache.axiom.core.NodeFactory;
-import org.apache.axiom.om.impl.intf.AxiomInformationItem;
-import org.apache.axiom.om.impl.llom.factory.LLOMNodeFactory;
-import org.apache.axiom.weaver.annotation.Mixin;
-
-@Mixin
-public abstract class AxiomInformationItemMixin implements 
AxiomInformationItem {
-    @Override
-    public final NodeFactory coreGetNodeFactory() {
-        return LLOMNodeFactory.INSTANCE;
-    }
-}
diff --git 
a/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/mixin/package-info.java
 
b/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/mixin/package-info.java
deleted file mode 100644
index 6ea59b462..000000000
--- 
a/implementations/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/mixin/package-info.java
+++ /dev/null
@@ -1,23 +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.
- */
[email protected](
-        mixins = {
-            AxiomInformationItemMixin.class,
-        })
-package org.apache.axiom.om.impl.llom.mixin;
diff --git 
a/mixins/core-mixins/src/main/java/org/apache/axiom/core/CoreNode.java 
b/mixins/core-mixins/src/main/java/org/apache/axiom/core/CoreNode.java
index 38335c05f..896cebb21 100644
--- a/mixins/core-mixins/src/main/java/org/apache/axiom/core/CoreNode.java
+++ b/mixins/core-mixins/src/main/java/org/apache/axiom/core/CoreNode.java
@@ -20,6 +20,7 @@ package org.apache.axiom.core;
 
 import org.apache.axiom.core.stream.StreamException;
 import org.apache.axiom.core.stream.XmlHandler;
+import org.apache.axiom.weaver.annotation.Inject;
 
 public interface CoreNode {
     /**
@@ -38,6 +39,7 @@ public interface CoreNode {
 
     void coreSetOwnerDocument(CoreDocument document);
 
+    @Inject
     NodeFactory coreGetNodeFactory();
 
     /**

Reply via email to