[picocontainer-dev] Preferring Parameter names.....

Paul Hammant <[email protected]>
Newsgroups gmane.comp.java.picocontainer.devel
Message-ID <[email protected]>
.. OK I started this 10 days ago before Konstantin's most recent  
changes, but then I went to new york and lost a week.

What if parameter names were not just indicated with  
Characteristics.USE_NAMES ?

What if there was a BehaviorFactory that suggested that the use of  
parameter names was a for all components that the container contains..


Is it useful ?   It does not quite work for now (bug), but before I  
complete and commit, I would like to take the time to gather the  
thoughts of others.

One bug is related to paranmer - it has a NPE for attempts to access  
parameter names for classes in the system classloader.

- Paul

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email
abf.patch (application/octet-stream, 689 B)
Index: container/src/java/org/picocontainer/behaviors/AbstractBehaviorFactory.java
===================================================================
--- container/src/java/org/picocontainer/behaviors/AbstractBehaviorFactory.java	(revision 3952)
+++ container/src/java/org/picocontainer/behaviors/AbstractBehaviorFactory.java	(working copy)
@@ -72,4 +72,14 @@
         }
         return true;
     }
+
+    protected void mergeProperties(Properties into, Properties from) {
+        Enumeration e = from.propertyNames();
+        while (e.hasMoreElements()) {
+            String s = (String)e.nextElement();
+            into.setProperty(s,from.getProperty(s));
+        }
+
+    }
+
 }
ParameterNamesPreferring.java (application/octet-stream, 2.3 KB) - not displayed
ParameterNamesPreferringTestCase.java (application/octet-stream, 3 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.