avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject RE: Attributes Proof of Concept
Date Tue, 12 Aug 2003 06:27:14 GMT
<quote who="Leo Sutic">
> OK, I have added some code to scan ClassLoaders:
> URLClassLoader cl1 = new URLClassLoader (new URL[]{new File
> ("api/target/cl1/").toURL ()}, getClass().getClassLoader ());
>         URLClassLoader cl2 = new URLClassLoader (new URL[]{new File
> ("api/target/cl2/cl2.jar").toURL ()}, getClass().getClassLoader ());
>         ClassLoaderUtil clUtil = ClassLoaderUtil.getClassLoaderUtil ();
>         Collection cl1Classes = clUtil.getClasses (cl1);
>         Collection cl2Classes = clUtil.getClasses (cl2);
>         System.out.println (cl1Classes);
>         System.out.println (cl2Classes);
> Its in avalon-sandbox/attributes.

Sorry to butt in...

What happened to the XP voices in Avalon.

The simplest solution that can possibly work!

Since the whole Attribute world requires tools, such as an Ant task or a
standalone compiler, why not let that tool create the index file, and for
each URI in the classloader just get the "/index.attrs", which can be
fully populated with the whole sha-bang....

No need for recursive loading of classes (=very slow startups) and works
on non-JAR class repositories as well.

My 0.02 ringgit.

To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org

View raw message