[picocontainer-dev] Specify a zero arg constructor?

"Michael Rimov" <[email protected]>
Newsgroups gmane.comp.java.picocontainer.devel
Organization Centerline Computers, Inc
Message-ID <007f01c8431d$8e145970$aa3d0c50$@com>
Hi All,

I've got an issue with the following code:

        MutablePicoContainer pico = new DefaultPicoContainer();
        pico.addComponent(ArrayList.class, ArrayList.class);
        pico.addComponent(HashSet.class);
        assertNotNull(pico.getComponent(ArrayList.class));  //Error!

The following claims a circular dependency exception... simple enough....
because ArrayList can have a ArrayList(Collection) constructor.

Great.... now how can we specify the simple:  new ArrayList() no arg
constructor?

In the past, we could:

        pico.addComponent(ArrayList.class, ArrayList.class, new Parameter[0]{});

But that doesn't appear to be working. (I assume because of the variable arg
constructors, it becomes impossible to tell if there was no parameter passed in,
or an empty array)

Any thoughts?

	
-Mike




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

    http://xircles.codehaus.org/manage_email
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.